Home > Software engineering >  How can we set dependency in pre requisite of Postman Automation?
How can we set dependency in pre requisite of Postman Automation?

Time:03-11

I have 2 Postman scripts:

  1. Issue offer
  2. Redeem offer

Redeem offer API is dependent to the Issue offer API. So, everytime to run redeem offer, we need to run first Issue offer.

To do this how can we add issue offer to the Pre-requisite of Redeem offer?

CodePudding user response:

In Postman, the concept is the other way around: You can use postman.setNextRequest() to set the next request to be executed.

So in Issue offer, you call postman.setNextRequest('Redeem offer'), and after Issue offer is finished, Redeem offer will be executed.

For more info, see https://learning.postman.com/docs/running-collections/building-workflows/

  • Related