API automation is designed to quickly test the custom-facing API without any manual work. To accomplish this, we set up a Postman collection which hits all the custom-facing API endpoints and runs a few tests on the response, checking first of all if the HTTP response code is 200 (OK) and some other basic details.
However, the main way we will run the collection is through a trigger in AWS Code Pipeline (api-dev).
A build project called PostmanAPITest is run after the development environment API code is deployed, which runs code to execute the postman collection with a tool called
In many cases we want to store identifiers for newly created objects, for example the ID of a newly created client. Because postman tests are run sequentially, this allows subsequent tests to reference previously-defined environment variables for API requests, or for other reasons.
In order to do it we write the value using a command like such in the test tab