2
votes

I have three API requests in a postman collection. I want to run the first and third requests once and the second request multiple times using a data file.

When I pass the data file to the Postman runner it runs all the three requests multiple times based on entries in the data file.

Is there a way to tell Postman or Newman to use data files for certain request only and not all of them. Or if there is any workaround or a different approach.

Note:- I am refraining from using separate collections for the requests which I will run multiple times as it would become difficult to maintain multiple collections.

1
How about iterating the request in pre-requisite tabs of the request you want to run single time or something like that?Dev

1 Answers

1
votes

I think this can be achieved with postman.setNextRequest().

Checkout Building request workflows for the details.