I have a postman request in the below order
POST request 4 , 5 and 6 needs to repeated (say 10 times)
I tried copy of Request like below....
Is there a better way than copy ?
postman.setNextRequest("request_name")
should be helping your case.
Note: This will help only when you run the collection using postman runner and the name of the requests in the collection has to be unique.
in your case, rename the requests in your collection like
GET Request 1
GET Request 2
POST Request 3
POST Request 4
POST Request 5
POST Request 6
and place the below code in the test tab of the POST Request 6
var maxCount = pm.environment.get("maxCount"); //number of times you want to repeat requests 4,5,6
var currentCount = pm.environment.get("currentCount"); //set this to 0 when starting the test
if (currentCount < maxCount) {
currentCount = currentCount + 1;
pm.environment.set("currentCount", currentCount);
postman.setNextRequest("POST Request 4")
}