How to send requests in a loop in Postman

We can utilize Postman's Collection Runner feature. When using Postman's Collection Runner, you can specify a collection of requests and set the number of iterations, allowing each request to be executed a specified number of times within the loop.

Home > Blog > How to send requests in a loop in Postman

When using Postman, there are instances where we need to send requests multiple times. In such cases, we can utilize Postman's Collection Runner feature. When using Postman's Collection Runner, you can specify a collection of requests and set the number of iterations, allowing each request to be executed a specified number of times within the loop. Below are the detailed steps:

1.Create a Request Collection

First, you need to create a request collection in Postman. You can do this by clicking on 'Collections' in the left navigation bar and then selecting 'New Collection' to create a new collection, and then adding your requests to this collection.

send requests in a loop in Postman

2.Edit Requests

After adding requests to the collection, open each request and ensure they are properly configured, including URL, request method, headers, request body, etc.

send requests in a loop in Postman

3.Launch Collection Runner

Select the 'Run collection' tab within the collection, where you can choose the interfaces to run in the collection, as well as the number of loops and run time.

send requests in a loop in Postman

You can also select a data file in the 'Data' tab to provide data for use in the loop. Once all settings are configured, click 'Run Collection' to start the Collection Runner.

send requests in a loop in Postman

4.View Results

After running, you can view the execution of each request in the Collection Runner's result window. This includes response time, status codes, response bodies, and other information.

send requests in a loop in Postman

By using the Collection Runner, you can execute a set of requests in a loop and dynamically set request parameters using a data file as needed, making batch testing and automation tasks simpler and more flexible.

Summary

When using Postman, the Collection Runner feature conveniently allows for batch sending of requests and looping execution, including setting up request collections, editing requests, launching, and viewing results. Although powerful, this feature comes with various limitations and is a paid feature.

How to send requests in a loop in Postman
We can utilize Postman’s Collection Runner feature. When using Postman’s Collection Runner, you can specify a collection of requests and set the number of iterations, allowing each request to be executed a specified number of times within the loop.

Learn more: