Building Request Workflows
We have already looked at how Postman runs requests in a couple of previous chapters. If you create a collection with a series of requests in it and then run that collection, the requests will be run in the order in which they are listed in the collection. As mentioned in Chapter 6 – Creating Test Validation Scripts, you can override the order in which tests are run by using the postman.setNextRequest
command. This is an example of creating a testing workflow, but there are also a few other ways to do this.
Linear Workflows
The simplest workflow is a linear workflow. What I mean by a linear workflow is just a set of requests that run in a given order but that have some shared thread that run through them. The distinction between a linear workflow and a collection with a set of requests, is that in the linear workflow the requests will have dependencies on each other. If you were to change the order in which the tests were run things would break.Think...