Platform 2.0 REST-endpoint testing

Introduction

Platform 2.0 will come bundled with REST-WS module and FHIR module. Before making the final release, we intend to run end to end tests for the REST endpoints defined in both the modules. Testing of FHIR endpoints was done by @Mayank Sharma and we are left with testing of REST-WS module's endpoints. This wiki describes the process we are following to test the REST-WS endpoints.

For REST-WS module we are using this Google Sheet to log testing activities. Later, data from the sheet will be used to develop an automated rest endpoint testing system and we will deprecate the manual testing of rest endpoints for future releases. We are only proceeding with the manual testing due to time constraints and absence of an established end to end rest-endpoint testing system for platform releases.

Rudimentary Testing

  • Create a user

  • Create a concept (e.g., "Nose hair density" as numeric observation)

  • Search for concept by name (prove it can be found by name)

  • Retire the new concept

  • Purge the new concept

  • Register a new patient

  • Create a visit for the patient

  • Create an encounter in that visit with one obs and one drug order

  • Add an allergy to penicillin

Steps to test 

  1. Head to http://uat01.openmrs.org:8080/openmrs/module/webservices/rest/apiDocs.htm

  2. Choose a category of rest endpoints from the screen 

  3. Click on expand operations to see the list of available rest endpoints

  4. Enter the parameter values in the provided textboxes

  5. Click on "Try it out" button for that endpoint

  6. Head to the Google Sheet and fill up the entries for the endpoint you just tested

 

If you face any issues or would like to suggest improvements in the current testing strategy, please do not hesitate to start a talk topic and get in touch with @Mayank Sharma, @Wyclif Luyima or @Burke Mamlin