How to send the same request several times

Hi @ghazaryan.nelli!

Yes, you can accomplish this by looping using postman.setNextRequest('request_name'); .

https://learning.postman.com/docs/postman/scripts/branching-and-looping/

You’ll need to make the loop conditional on the number of times you’ve looped already. I’d recommend doing something like this in a test script:

if(!pm.variables.has('counter')) {
   pm.variables.set('counter',0);
}

var counter = pm.variables.get('counter');
counter++;
pm.variables.set('counter', counter);

if (counter < 5) {
   postman.setNextRequest('your_request_name');
} else {
   postman.setNextRequest(null);
}