Collection Runner in Postman is a powerful feature that allows you to execute an entire collection of API requests in sequence. It is mainly used for automation, data-driven testing, and validating multiple endpoints at once.
A Postman Collection contains folders and requests. When executed via the Collection Runner, Postman runs each request sequentially for a defined number of iterations. During execution, pre-request scripts and tests are triggered automatically.
// Tests tab script to validate response status
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
// Store token from response into environment variable
var jsonData = pm.response.json();
pm.environment.set("authToken", jsonData.token);
When the collection is run, each request executes sequentially. Test results are shown as passed or failed for every iteration. Variables such as authToken can be reused across subsequent requests.
Collection Runner executes requests in the following flow. Click the "Run Collection" button below to simulate how Postman processes a list of API calls sequentially.