Add delay between API requests in Postman collection
Preconditions (2)
✅ Expected Result: The collection runner pauses for 3 seconds between the first and second requests, delaying the next request execution as scripted.
Jump into concepts and practice - no test required
pm.test('Delay 3 seconds before next request', function(done) { setTimeout(() => { done(); }, 3000); });
This script is added in the Tests tab of the first request. It uses pm.test with a callback done to create an asynchronous test. Inside, setTimeout waits for 3000 milliseconds (3 seconds) before calling done(), which tells Postman to continue to the next request. This effectively adds a 3-second delay between requests during collection run.
This approach is simple and uses Postman's built-in asynchronous test handling to pause execution without blocking the UI.
Now add data-driven testing with 3 different delay durations (1s, 3s, 5s) for the delay between requests
setTimeout(() => postman.setNextRequest('Login'), 3000);
console.log('Request scheduled');setTimeout(postman.setNextRequest('NextRequest'), 1000);