'Postman: Is it possible to customize the sequence of test runs in the collection runner
I have several tests in my postman collection but some of them are dependent on few others from within the collection as the latter set some envt variables that are used by other tests. I want these to run in a sequence. The tests in my collection are distributed across different folders. Is there a possibility to define such a sequence in a test suite like structure?
Solution 1:[1]
The execution happens according to how the folders and tests within each is displayed inside Postman.
In a collection, I normally number my folders according to the execution order and then the individual tests can be prefixed with numbers as well, so that you control the execution. Refer to the attached screenshot.
Also there's a postman.setNextRequest('Request-title');
method to customize which request you want to execute next.
Source - http://blog.getpostman.com/2016/03/23/conditional-workflows-in-postman/
Solution 2:[2]
You can drag/drop requests in postman in order that you want to be executed in Collection Runner
Solution 3:[3]
https://github.com/postmanlabs/postman-app-support/issues/8433 The above link offers a good suggestion for "Recent Runs". Hope it is going to be helpful for someone.
Solution 4:[4]
You could sort now requests by drag and drop them to fit your order
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | luka martinovic |
Solution 3 | duck |
Solution 4 | CamelCase |