Apply scenarios and behaviors to a simulation
Running simulations locally is available on all Postman plans. Deploying a simulation to the Postman Cloud is available on Solo, Team, and Enterprise plans only. For more information, see the pricing page.
After you create a simulation, select the scenario you want to use for each mock. The simulation uses the behaviors defined on that scenario, such as errors, latency, and rate limits. You can override any of these behaviors for the simulation without changing the scenario itself. You can select scenarios and override behaviors before or during a simulation.
-
Open a workspace and select Tools >
Simulator in the footer.
-
Select the simulation you’d like to configure.
-
(Optional) Update the mocks included in the simulation.
-
For each mock, use the Scenario dropdown list to choose a scenario. The scenario’s behaviors are shown, along with the value for each.
-
(Optional) To override a behavior for the simulation, click
Customize for this simulation next to a behavior, select a new value, and click
to save. The scenario’s original value is shown for reference. You can override the following behaviors:
- Error response — Return a specified HTTP status code.
- Response delay — Add a delay (in milliseconds) before the mock sends a response, simulating network latency.
- Rate limit — Specify a maximum number of requests allowed per minute.
- Chaos mode — Randomly fail a percentage of requests with 5xx status codes.
If you enable both Error response and Chaos mode, and the configured error response is a 5xx status code (such as
502), Chaos mode only returns that specific 5xx error. For example, if you select502, Chaos mode only returns502responses.If your goal is to test 5xx failures, use either Error response or Chaos mode.
-
(Optional) To clear the overrides for a mock and return to the scenario’s behaviors, click
Reset.
-
Make calls to the simulation to see the behaviors applied.
To run a simulation with the scenarios you’ve configured, see Create and run a simulation.