projectbuendia / client

Android client app
Apache License 2.0
38 stars 23 forks source link

Add a smoke test that exercises the entire server API #444

Closed zestyping closed 5 years ago

zestyping commented 5 years ago

Internal changes

This adds an instrumented test that runs a tablet through all the operations necessary to exercise every type of request to our REST API.

The operations tested are as follows:

Step Client operation Server operation
0 start app  list all users    
1 add new user post new user     
2 fresh initial sync fetch all charts, concepts, forms,
locations, observations, orders, patients 
   
3 add new patient post new patient     
4 periodic sync incremental sync observations, orders, patients     
5 go to patient by ID search for patient by ID     
6 edit patient post update to existing patient     
7 edit admission date post encounter     
8 open form fetch XForm     
9 submit form post XForm instance    
10 add new order post new order     
11 edit order update existing order     
12 delete order delete existing order     
13 log user action retrieve single concept

The complete set of possible requests is as follows. "–" marks an unused request type; the numbers indicate how each request type is exercised by one of the steps above.

Resource List Search Retrieve Create Update Delete
/charts 2
/concepts 2 13
/encounters 7
/locations 2
/observations 2,4
/orders 2,4 10 11 12
/patients 2,4 / 5,6 3 6
/users 0 1
/xforminstances 9
/xforms 2 2, 8