Have an external workfow

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:

  1. Get a list of all the pets, test for array size 0 (alternatively, store the array size somewhere)
  2. Add a pet
  3. Find pet by id
  4. Get a list of all the pets. test if the size = 1 (or previous size + 1)
  5. Delete the pet
  6. Find pet by id, this time it should give an error
  7. 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.

3 Likes