Hey @postman-paul540, thanks for the suggestion!
At the moment, we’re deliberating the right transition from postman.setNextRequest
to the corresponding pm.*
equivalent. Until the required behaviour is finalized, this will serve as a useful reference for possible improvements.
At the time of writing, I can think of the following:
- Ability to specify the scope of the match (current folder, entire collection, and so on) (https://github.com/postmanlabs/postman-app-support/issues/2819)
- Ability to pick which matched request to proceed with (1st, 2nd, last, and so on)
- Ability to skip to the start of a folder. (https://github.com/postmanlabs/postman-app-support/issues/2851)
- In addition, information on the previous and next requests could also be included for more advanced workflows.
EDIT: (9 July 2018)
- Setting the next to request to
null
should stop the collection run, even if the current scope is in a pre-request script.