1. Introduction
Postman is a popular tool for testing and developing APIs. It allows you to create, organize, and execute requests in a user-friendly interface. But did you know that you can also automate postman collections using runners and monitors? This can save you time and effort, as well as help you ensure the quality and performance of your APIs.
In this tutorial, you will learn what are postman runners and postman monitors, and how to use them to automate your postman collections. You will also see some examples of how to run your collections on a schedule or in different scenarios. By the end of this tutorial, you will be able to use postman runners and monitors to automate your postman collection execution and get insights into your API behavior.
Before you start, make sure you have Postman installed on your computer. You can download it from here. You will also need a Postman account to use monitors. You can sign up for free from here.
Ready to automate your postman collections? Let’s get started!
2. What are Postman runners and monitors?
Postman runners and monitors are features of Postman that allow you to automate your postman collections. A collection is a group of requests that can be executed together as a single unit. You can use collections to test different aspects of your API, such as functionality, performance, security, and documentation.
Postman runners are tools that let you run your collections locally on your computer. You can use runners to execute your collections in different scenarios, such as testing multiple environments, running multiple iterations, or passing data between requests. Runners also provide you with detailed reports of your collection execution, such as the number of passed and failed tests, the response time, and the console logs.
Postman monitors are tools that let you run your collections remotely on the Postman cloud. You can use monitors to execute your collections on a schedule, such as every hour, day, or week. Monitors also provide you with insights into your API behavior, such as the availability, reliability, and performance of your endpoints. You can also set up alerts and notifications to get notified of any issues or failures in your collection execution.
By using postman runners and monitors, you can automate your postman collection execution and get valuable feedback on your API quality and performance. This can help you improve your API development and testing process, as well as ensure the satisfaction of your API consumers.
How do you use postman runners and monitors to automate your postman collections? Let’s find out in the next sections.
2.1. Postman runners
Postman runners are tools that let you run your collections locally on your computer. You can use them to automate your postman collections in different scenarios, such as testing multiple environments, running multiple iterations, or passing data between requests. Runners also provide you with detailed reports of your collection execution, such as the number of passed and failed tests, the response time, and the console logs.
To use postman runners, you need to have a collection that you want to run. You can create a collection from scratch, or import an existing one from a file or a URL. You can also use the Postman API to programmatically create or update collections. A collection can contain one or more requests, each with its own URL, method, parameters, headers, body, and tests. You can also add variables, scripts, and documentation to your collection to make it more dynamic and reusable.
Once you have a collection, you can open the runner window by clicking the Runner button on the top left corner of the Postman app. The runner window will show you a list of your collections and environments. You can select the collection that you want to run, and the environment that you want to use. You can also configure the runner settings, such as the number of iterations, the delay between requests, the data file, and the log level. You can also choose which requests to run or skip, and which folders to include or exclude.
After you have configured the runner settings, you can click the Run button to start the collection execution. The runner window will show you the progress of the execution, as well as the results of each request and test. You can also view the console logs, the response data, and the test scripts for each request. You can also pause, resume, or stop the execution at any time.
Using postman runners, you can automate your postman collection execution and get feedback on your API functionality and performance. This can help you debug and improve your API development and testing process.
How do you use postman monitors to automate your postman collections? Let’s see in the next section.
2.2. Postman monitors
Postman monitors are tools that let you run your collections remotely on the Postman cloud. You can use them to automate your postman collections on a schedule, such as every hour, day, or week. Monitors also provide you with insights into your API behavior, such as the availability, reliability, and performance of your endpoints. You can also set up alerts and notifications to get notified of any issues or failures in your collection execution.
To use postman monitors, you need to have a Postman account and a collection that you want to monitor. You can create a monitor from the Postman app or the Postman web dashboard. You can also use the Postman API to programmatically create or update monitors. A monitor can be linked to a collection and an environment, and can have its own schedule, frequency, regions, and integrations.
Once you have created a monitor, you can view the monitor results on the Postman web dashboard. The dashboard will show you the summary of the monitor execution, such as the number of runs, the success rate, the average response time, and the failure reasons. You can also view the details of each run, such as the request and response data, the test results, and the console logs. You can also download the monitor reports or export them to other formats.
Using postman monitors, you can automate your postman collection execution and get insights into your API quality and performance. This can help you ensure the reliability and availability of your API, as well as identify and resolve any issues or failures.
How do you use postman runners and monitors to automate your postman collections? Let’s see some examples in the next sections.
3. How to use Postman runners to automate your collections
In this section, you will learn how to use postman runners to automate your postman collections locally on your computer. You will see how to create a collection, configure the runner settings, run the collection, and view the results. You will also see some examples of how to use runners to execute your collections in different scenarios, such as testing multiple environments, running multiple iterations, or passing data between requests.
To follow along with this section, you will need to have Postman installed on your computer. You can download it from here. You will also need a collection that you want to run. You can create a collection from scratch, or import an existing one from a file or a URL. You can also use the Postman API to programmatically create or update collections.
Let’s start by creating a collection.
3.1. Create a collection
A collection is a group of requests that can be executed together as a single unit. You can use collections to test different aspects of your API, such as functionality, performance, security, and documentation. To use postman runners, you need to have a collection that you want to run. You can create a collection from scratch, or import an existing one from a file or a URL. You can also use the Postman API to programmatically create or update collections.
To create a collection from scratch, follow these steps:
- Open the Postman app and click the New button on the top left corner.
- Select Collection from the list of options.
- Enter a name and a description for your collection. You can also add variables, scripts, and documentation to your collection to make it more dynamic and reusable.
- Click Create to create your collection.
- Add requests to your collection by clicking the Add requests button. You can also drag and drop existing requests from other collections or folders.
- For each request, enter the URL, method, parameters, headers, body, and tests. You can also add variables, scripts, and documentation to your request to make it more dynamic and reusable.
- Save your request by clicking the Save button.
- Repeat steps 5-7 for each request that you want to add to your collection.
To import a collection from a file or a URL, follow these steps:
- Open the Postman app and click the Import button on the top left corner.
- Select the file or the URL that contains the collection that you want to import. You can also drag and drop the file to the import window.
- Click Import to import your collection.
- View your imported collection in the sidebar under the Collections tab.
To create or update a collection using the Postman API, follow these steps:
- Generate an API key from the Postman web dashboard by going to here.
- Use the Postman API documentation to find the endpoint and the parameters that you need to create or update your collection.
- Send a request to the Postman API using your API key and the endpoint and parameters that you need.
- View the response from the Postman API to see the details of your created or updated collection.
By creating a collection, you can group your requests and execute them together as a single unit. This can help you test and develop your API more efficiently and effectively.
How do you configure the runner settings to automate your collection? Let’s see in the next section.
3.2. Configure the runner settings
After you have created a collection, you can configure the runner settings to automate your postman collection execution locally on your computer. You can use the runner settings to customize how your collection is executed, such as the number of iterations, the delay between requests, the data file, and the log level. You can also choose which requests to run or skip, and which folders to include or exclude.
To configure the runner settings, follow these steps:
- Open the Postman app and click the Runner button on the top left corner.
- Select the collection that you want to run, and the environment that you want to use.
- Under the Iterations section, enter the number of times that you want to run your collection. You can also select a data file to pass data between requests or iterations. The data file can be in CSV or JSON format.
- Under the Delay section, enter the amount of time that you want to wait between each request. You can also enable the Keep variable values option to persist the variable values across iterations.
- Under the Log Level section, select the level of detail that you want to see in the console logs. You can choose from Info, Warn, or Error.
- Under the Run Order section, select or deselect the requests or folders that you want to include or exclude from the collection execution. You can also drag and drop the requests or folders to change their order.
- Click Run to start the collection execution.
By configuring the runner settings, you can automate your postman collection execution and run your collection in different scenarios, such as testing multiple environments, running multiple iterations, or passing data between requests. This can help you test and develop your API more efficiently and effectively.
How do you run the collection and view the results? Let’s see in the next section.
3.3. Run the collection
After you have created a collection and configured the runner settings, you can run the collection and view the results. You can use the runner window to start, pause, resume, or stop the collection execution. You can also view the progress and the outcome of each request and test. You can also view the console logs, the response data, and the test scripts for each request.
To run the collection and view the results, follow these steps:
- Open the Postman app and click the Runner button on the top left corner.
- Select the collection that you want to run, and the environment that you want to use.
- Configure the runner settings, such as the number of iterations, the delay between requests, the data file, and the log level. You can also choose which requests to run or skip, and which folders to include or exclude.
- Click Run to start the collection execution.
- View the progress and the results of the collection execution on the runner window. You can see the number of passed and failed tests, the response time, and the console logs for each request. You can also view the response data and the test scripts for each request by clicking on the request name.
- Pause, resume, or stop the collection execution at any time by clicking the Pause, Resume, or Stop buttons.
By running the collection and viewing the results, you can automate your postman collection execution and get feedback on your API functionality and performance. This can help you debug and improve your API development and testing process.
How do you use postman monitors to automate your postman collections? Let’s see in the next section.
3.4. View the results
After you have run the collection, you can view the results and get feedback on your API functionality and performance. You can use the runner window to see the details of each request and test, such as the number of passed and failed tests, the response time, and the console logs. You can also view the response data and the test scripts for each request. You can also export or share the results with others.
To view the results, follow these steps:
- Open the Postman app and click the Runner button on the top left corner.
- Select the collection that you have run, and the environment that you have used.
- View the summary of the collection execution on the runner window. You can see the total number of requests, tests, and iterations, as well as the average response time and the success rate.
- View the details of each request and test on the runner window. You can see the number of passed and failed tests, the response time, and the console logs for each request. You can also view the response data and the test scripts for each request by clicking on the request name.
- Export or share the results with others by clicking the Export Results or Share Results buttons. You can export the results as a JSON file, or share them as a link or an email.
By viewing the results, you can automate your postman collection execution and get feedback on your API functionality and performance. This can help you debug and improve your API development and testing process.
How do you use postman monitors to automate your postman collections? Let’s see in the next section.
4. How to use Postman monitors to automate your collections
Postman monitors are tools that let you run your collections remotely on the Postman cloud. You can use them to automate your postman collections on a schedule, such as every hour, day, or week. Monitors also provide you with insights into your API behavior, such as the availability, reliability, and performance of your endpoints. You can also set up alerts and notifications to get notified of any issues or failures in your collection execution.
To use postman monitors, you need to have a collection that you want to run, and a Postman account to access the Postman cloud. You can sign up for a free Postman account from here. You can also upgrade to a paid plan to get more features and benefits, such as more monitors, more requests, more data retention, and more integrations. You can compare the different plans and pricing from here.
Once you have a collection and a Postman account, you can create a monitor and configure the monitor settings. You can also view the monitor results and get insights into your API behavior. You can also export or share the monitor results with others.
How do you create a monitor and configure the monitor settings? Let’s see in the next section.
4.1. Create a monitor
To use postman monitors, you need to have a collection that you want to run, and a Postman account to access the Postman cloud. You can sign up for a free Postman account from here. You can also upgrade to a paid plan to get more features and benefits, such as more monitors, more requests, more data retention, and more integrations. You can compare the different plans and pricing from here.
Once you have a collection and a Postman account, you can create a monitor and configure the monitor settings. A monitor is a service that runs your collection on a schedule, such as every hour, day, or week. You can also specify the region and the environment for your monitor. A monitor also provides you with insights into your API behavior, such as the availability, reliability, and performance of your endpoints. You can also set up alerts and notifications to get notified of any issues or failures in your collection execution.
To create a monitor, follow these steps:
- Open the Postman app and select the collection that you want to monitor.
- Click the Monitor button on the top right corner.
- Enter a name and a description for your monitor.
- Select the frequency and the time zone for your monitor. You can choose from predefined options, such as every 5 minutes, every hour, or every day, or you can create a custom schedule.
- Select the region and the environment for your monitor. You can choose from different regions, such as US East, US West, Europe, or Asia Pacific. You can also choose an environment that contains the variables and values that you want to use for your monitor.
- Click Create to create your monitor.
By creating a monitor, you can automate your postman collection execution on a schedule, and get insights into your API behavior. This can help you ensure the availability, reliability, and performance of your API endpoints.
How do you configure the monitor settings and view the monitor results? Let’s see in the next sections.
4.2. Configure the monitor settings
After you have created a monitor, you can configure the monitor settings to customize your collection execution and get the best results. You can change the frequency, the region, the environment, and the notifications for your monitor. You can also add integrations to connect your monitor with other services, such as Slack, Webhooks, or Datadog.
To configure the monitor settings, follow these steps:
- Open the Postman app and go to the Monitors tab on the left sidebar.
- Select the monitor that you want to configure and click the Edit button on the top right corner.
- Change the frequency and the time zone for your monitor. You can choose from predefined options, such as every 5 minutes, every hour, or every day, or you can create a custom schedule.
- Change the region and the environment for your monitor. You can choose from different regions, such as US East, US West, Europe, or Asia Pacific. You can also choose an environment that contains the variables and values that you want to use for your monitor.
- Change the notifications for your monitor. You can choose to receive email notifications for every run, only for failed runs, or never. You can also add recipients for the email notifications.
- Add integrations for your monitor. You can choose from different integrations, such as Slack, Webhooks, or Datadog, and configure them according to your needs. You can also create custom integrations using the Postman API.
- Click Save to save your monitor settings.
By configuring the monitor settings, you can automate your postman collection execution and get the best results. You can also connect your monitor with other services and get notified of any issues or failures in your collection execution.
How do you view the monitor results and get insights into your API behavior? Let’s see in the next section.
4.3. View the monitor results
After you have created and configured a monitor, you can view the monitor results and get insights into your API behavior. You can use the Postman web dashboard or the Postman app to see the details of each monitor run, such as the number of passed and failed tests, the response time, and the console logs. You can also view the response data and the test scripts for each request. You can also export or share the monitor results with others.
To view the monitor results, follow these steps:
- Open the Postman web dashboard and sign in with your Postman account.
- Go to the Monitors tab and select the monitor that you want to view.
- View the summary of the monitor execution on the dashboard. You can see the total number of runs, tests, and requests, as well as the average response time and the success rate.
- View the details of each monitor run on the dashboard. You can see the number of passed and failed tests, the response time, and the console logs for each run. You can also view the response data and the test scripts for each request by clicking on the request name.
- Export or share the monitor results with others by clicking the Export Results or Share Results buttons. You can export the results as a JSON file, or share them as a link or an email.
Alternatively, you can also view the monitor results using the Postman app. To do so, follow these steps:
- Open the Postman app and sign in with your Postman account.
- Go to the Monitors tab on the left sidebar and select the monitor that you want to view.
- View the summary and the details of the monitor execution on the app. You can see the same information as on the web dashboard, such as the number of runs, tests, and requests, the response time, the success rate, and the console logs.
- Export or share the monitor results with others by clicking the Export Results or Share Results buttons. You can export the results as a JSON file, or share them as a link or an email.
By viewing the monitor results, you can automate your postman collection execution and get insights into your API behavior. You can also connect your monitor with other services and get notified of any issues or failures in your collection execution.
How do you conclude your tutorial and summarize the main points? Let’s see in the next section.
5. Conclusion
In this tutorial, you have learned how to automate your postman collections using runners and monitors. You have seen what are postman runners and monitors, and how to use them to execute your collections on a schedule or in different scenarios. You have also learned how to create, configure, and view the results of your monitors, and how to get insights into your API behavior. You have also learned how to connect your monitors with other services and get notified of any issues or failures in your collection execution.
By using postman runners and monitors, you can automate your postman collection execution and get valuable feedback on your API quality and performance. This can help you improve your API development and testing process, as well as ensure the satisfaction of your API consumers.
We hope you have enjoyed this tutorial and found it useful. If you have any questions or feedback, please feel free to leave a comment below. You can also check out the Postman documentation and the Postman community forum for more resources and support. Thank you for reading and happy testing!