Hey @danielcd
Welcome to the Postman community.
It sounds like you want to use “postman.sendNextRequest()” to control your workflow.
There is no “run this collection as a pre-requisite” in Postman but I’m doing exactly what you’re wanting in my workspace.
https://learning.getpostman.com/docs/postman/collection_runs/building_workflows/
I’ve posted about this quite a bit in the forum:
Assuming your requests are in this order in your collection 1 > 2 > 3 and you want to run your requests in the below order using postman.setNextRequest()
1 > 3 > 2?
postman.setNextRequest() is working as expecting in your example.
If you want to call request 2, then you’d need to use postman.setNextRequest("name-of-request-2") in request 3, so after request 3 has been completed it’ll run request 2.
Bear in mind, that after request 2 it’ll naturally go to the next request in your collection w…
Hey all,
First of all, it was great meeting some of you that attended the Postman event. For those attended, I hope you enjoyed or got something out of my talk
I’ve been asked to upload the slides I used during my talk but the slides on their own are pretty pointless, as 90% of the content was me talking over images. So I’ll just upload the code examples used in the last third of the slides.
For those that didn’t attend or need their memory jogging - this is about using “hooks”…
thanks for the mention @danny-dainton . I have to admit that I do find Postman pretty absent on nice re-use of various parts in the system, in particular code re-use, request re-use and dynamic flow execution. I have been battling with it for over a year and found some workable work-arounds. It’s all still a bit rough, but I want to start writing them up here over the next few months.
In essence, we have teams with dev’s and QA’s all adding to the same collection of grouped and alphabetised end …
And here’s my talk at this year’s PostCon where I specifically talk about this: