Trying to use .setNextRequest efficiently

I would do it more or less like this:

  • the post and delete will always return to get, so use postman.setNextRequest(“Get”);
  • the get request needs to figure out where to go next, post or delete. You can make the decision by evaluating a variable

Here is a sample collection exemplifying this:

https://www.getpostman.com/collections/8f80d004a0574c62ecce

It will stop after 3 iterations. I hope it helps.

3 Likes