2

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.

Pankaj Devrani
  • 510
  • 1
  • 10
  • 28
  • How about iterating the request in pre-requisite tabs of the request you want to run single time or something like that? – Dev Sep 01 '20 at 17:18

1 Answers1

1

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

Checkout Building request workflows for the details.

Christian Baumann
  • 3,188
  • 3
  • 20
  • 37