We tried out Postmanβs Neuman when working with @maany on testing Platform 2.0. With Docker installed, collections of REST tests can be shared via GitHub.
For example, assuming you have Docker installed,
$ docker --version ;# confirm docker is installed
Docker version 1.12.3, build 6b644ec
Then, you can run a collection of tests against the platform within a single command line:
$ docker run --rm -it postman/newman_alpine33 run "https://raw.githubusercontent.com/bmamlin/openmrs-contrib-postman-collections/master/platform-2.0-tests.postman_collection"
newman
platform-2.0-tests
β http://uat-platform.openmrs.org:8080/openmrs/ws/rest/v1/concept
POST http://uat-platform.openmrs.org:8080/openmrs/ws/rest/v1/concept [201 Created, 2.16KB, 3.3s]
β name.name == 'Nose Hair Density'
β datatype.uuid == '8d4a4488-c2cc-11de-8d13-0010c6dffd0f' (Numeric)
β http://uat-platform.openmrs.org:8080/openmrs/ws/rest/v1/concept?q=nose%20hair%20density&v=full
GET http://uat-platform.openmrs.org:8080/openmrs/ws/rest/v1/concept?q=nose%20hair%20density&v=full [200 OK, 3.76KB, 273ms]
β Found UUID for new concept
β Concept is not retired
β http://uat-platform.openmrs.org:8080/openmrs/ws/rest/v1/concept/{{NoseHairDensityUuid}}
DELETE http://uat-platform.openmrs.org:8080/openmrs/ws/rest/v1/concept/5c3d08a5-4710-4a5a-a9ce-355e31c66fcb [204 No Content, 2.02KB, 517ms]
β Status code is 204
β http://uat-platform.openmrs.org:8080/openmrs/ws/rest/v1/concept/{{NoseHairDensityUuid}}
GET http://uat-platform.openmrs.org:8080/openmrs/ws/rest/v1/concept/5c3d08a5-4710-4a5a-a9ce-355e31c66fcb [200 OK, 2.12KB, 74ms]
β Correct UUID
β Concept is retired
β http://uat-platform.openmrs.org:8080/openmrs/ws/rest/v1/concept/{{NoseHairDensity.uuid}}?purge=true
DELETE http://uat-platform.openmrs.org:8080/openmrs/ws/rest/v1/concept/5c3d08a5-4710-4a5a-a9ce-355e31c66fcb?purge=true [204 No Content, 2.02KB, 350ms]
β Status code is 204
βββββββββββββββββββββββββββ¬βββββββββββ¬βββββββββββ
β β executed β failed β
βββββββββββββββββββββββββββΌβββββββββββΌβββββββββββ€
β iterations β 1 β 0 β
βββββββββββββββββββββββββββΌβββββββββββΌβββββββββββ€
β requests β 5 β 0 β
βββββββββββββββββββββββββββΌβββββββββββΌβββββββββββ€
β test-scripts β 5 β 0 β
βββββββββββββββββββββββββββΌβββββββββββΌβββββββββββ€
β prerequest-scripts β 0 β 0 β
βββββββββββββββββββββββββββΌβββββββββββΌβββββββββββ€
β assertions β 8 β 0 β
βββββββββββββββββββββββββββ΄βββββββββββ΄βββββββββββ€
β total run duration: 5.9s β
βββββββββββββββββββββββββββββββββββββββββββββββββ€
β total data received: 7.43KB (approx) β
βββββββββββββββββββββββββββββββββββββββββββββββββ€
β average response time: 902ms β
βββββββββββββββββββββββββββββββββββββββββββββββββ
These collections can be created, exported, and imported using Postman.