Run a collection with a simulation
Postman Simulator is available on Postman Solo, Team, and Enterprise plans. For more information, see the pricing page.
With a local mock server, you can simulate your API’s dependencies and test how your service behaves without calling real services. You can use Postman Simulator to apply scenarios like latency, errors, and rate limits to your mock server, reproducing real-world conditions. This enables you to observe how your service responds to disruptions and performance constraints.
Configure a collection run with a simulation
Run a collection with a simulation to test how your service behaves under real-world conditions. When you start the run, Postman automatically starts the local mock server and applies the selected simulation as requests run. The mock server runs for the duration of the collection run and automatically stops when the run completes.
Before you run a collection with a simulation, make sure the base URL for requests is set to the mock server URL.
To run a collection with a simulation, do the following:
- Click
Items in the left sidebar.
- Click Collections and select the collection you want to run against a simulation.
- Select Run manually.
- Configure the collection run settings as needed, such as the number of iterations, delay, or test data file.
- Select a simulation configuration from the dropdown menu. You can also click
Create new simulation to create a simulation.
- (Optional) Click the Simulator tab in the left pane to edit the simulation.
- Click Run Collection.
Advanced settings aren’t supported when running a collection with a simulation.
With the Postman CLI, you can also run a collection with a simulation using the postman collection run --simulate command.
View simulation events
After running a collection with a simulation, you can review the results in the collection run results. All standard run details are available as usual, including test results, errors, and request metrics.
In the collection run results, click the Simulation events tab to show how the applied scenarios affected each request during the run. This tab includes a timeline of events with details such as the time, event, scenario applied, and additional context. You can also view how many tests passed or failed for each event.
Click the Simulation events tab to understand when and how failure conditions were triggered, and how your service responded to them.
Learn more about viewing collection run results.