To me it would really be useful to have an externally managed workflow.
For example take a petstore (https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore-expanded.yaml). If I import that and write some tests for it, I would like to also have some kind of script that says:
- Get a list of all the pets, test for array size 0 (alternatively, store the array size somewhere)
- Add a pet
- Find pet by id
- Get a list of all the pets. test if the size = 1 (or previous size + 1)
- Delete the pet
- Find pet by id, this time it should give an error
- Get a list of all the pets, test the size to be equal to the size at step 1.
As Iād to use my postman collection to also be the documentation of my external API, the test-sequence is best kept as a separate concern (this also facilitates testing multiple scenarios e.g. when adding features).
The way I can do it now is using two environment variables and setNextRequest, but that feels to hard coded (and cumbersome) to me.