Testing

Testing Overview


Over the course of the project, we have adopted unit testing to test our modules that we implemented. Once unit testing was done to ensure that our code was operating properly, we integrated multiple individual modules together and conducted integration testing to ensure the new combined modules were working as expected as well.

We also conducted manual testing when other testing method wasn't feasible such as checking the uploaded data on OpenMRS server to ensure that it was correct.

The table below shows the test we have conducted over the development period

OpenMRS Android Application

ID Test Scenario Expected Result Actual Result Pass/Fail
OpenMRS REST API
1 App is able to get patient details from OpenMRS server App receives patient details App receives patient details Pass
2 App is able to get patient’s observation from OpenMRS App receive patient’s observation data App receive patient’s observation data Pass
3 App is able to send patient observations to OpenMRS App uploads patient observations to OpenMRS App uploads patient observations to OpenMRS Pass
4 App is able to register a new patient App registers new patient on OpenMRS App registers new patient on OpenMRS Pass
GoogleFit API
1 First time GoogleFit authentication requests access to Google account App displays a new dialog for users to choose the Google account they used with GoogleFit App displays a new dialog for users to choose the Google account they used with GoogleFit Pass
2 Request user’s data from GoogleFit App output the correct data App output the correct data Pass
Fitbit API
1 Launching of ChromeTab to Fitbit login page App uses ChromeTab to launch login page App launches Chrome and shows Fitbit login page Pass
2 Fitbit authentication redirect back to app Fitbit redirects user back to mobile app with authorization code Fitbit redirects user back to mobile app with authorization code as URL parameter Pass
3 App sends request to Fitbit server using authorization code to exchange access code Access and refresh token received Access and refresh tokens received by app Pass
4 Using stored refresh token to get new access token once access token has expire New access token and refresh tokens received from Fitbit New access token and refresh tokens received from Fitbit Pass
5 Request user’s data from Fitbit using access token New access token and refresh tokens received from Fitbit User data received by app Pass
Database
1 Database created successfully Database created Database created Pass
2 Data inserted into database successfully Data inserted into database Data inserted into database Pass
3 Update existing data in database Data updated successfully Data updated successfully Pass
4 Retrieve existing data from database Data retrieved successfully Data retrieved successfully Pass
GraphData
1 Getting and setting values using GraphData class Values set then get are the same Values set then get are the same Pass
Integration of Fitbit with SyncData page
1 Downloaded Fitbit data is uploaded to OpenMRS server OpenMRS server should contain Fitbit data OpenMRS contains Fitbit data Pass
Integration of GoogleFit with SyncData page
1 First time GoogleFit authentication requests access to Google account App displays a new dialog for users to choose the Google account they used with GoogleFit App displays a new dialog for users to choose the Google account they used with GoogleFit Pass
2 Request user’s data from GoogleFit App output the correct data App output the correct data Pass
Manual Input
1 Height data is uploaded to OpenMRS server with correct date OpenMRS server contains height data with correct date OpenMRS server contains height data with correct date Pass
2 Weight data is uploaded to OpenMRS server with correct date OpenMRS server contains weight data with correct date OpenMRS server contains weight data with correct date Pass
3 Heart rate data is uploaded to OpenMRS server with correct date OpenMRS server contains heart rate data with correct date OpenMRS server contains heart rate data with correct date Pass
4 Calories data is uploaded to OpenMRS server with correct date OpenMRS server contains calories data with correct date OpenMRS server contains calories data with correct date Pass
5 Calories burned data is uploaded to OpenMRS server with correct date OpenMRS server contains calories burned data with correct date OpenMRS server contains calories burned data with correct date Pass
6 Distance data is uploaded to OpenMRS server with correct date OpenMRS server contains distance data with correct date OpenMRS server contains distance data with correct date Pass
7 Steps data is uploaded to OpenMRS server with correct date OpenMRS server contains steps data with correct date OpenMRS server contains steps data with correct date Pass
8 Floors climbed data is uploaded to OpenMRS server with correct date OpenMRS server contains floors climbed data with correct date OpenMRS server contains floors climbed data with correct date Pass
9 Active minutes data is uploaded to OpenMRS server with correct date OpenMRS server contains active minutes data with correct date OpenMRS server contains active minutes data with correct date Pass
Graph Visualisation
1 Graph should show steps data correctly over the past 5 days Graph shows correct data Graph shows correct data Pass
Health Data Analytics
1 Average heart rate shown is computed as average data from database over the past 5 days Average heart rate is the average data number of entries found in database Average heart rate is the average data number of entries found in database Pass
Chat Notification
1 Notification is issued when user receive a new chat message from their doctor while not currently on chat tab of the app The app issues a notification The app issues a notification Pass