Apply mock scenarios to a Postman simulation
You can select the scenario you want to use for each mock in a simulation. The simulation uses the conditions defined on that scenario, such as errors, latency, and rate limits. You can override any of these conditions for the simulation without changing the scenario itself. You can select scenarios and override conditions before or during a simulation.
-
Open a workspace and select Tools >
Simulations in the footer.
-
Select the simulation you’d like to configure.
-
(Optional) Update the mocks included in the simulation.
-
For each mock, use the Select scenario dropdown list to choose a scenario. The scenario’s conditions are shown, along with the value for each.
-
(Optional) To override a condition for the simulation, click
Customize for this simulation next to a condition, select a new value, and click
to save. The scenario’s original value is shown for reference. You can override the following conditions:
- Simulate Error Response — Simulate error responses by returning a specified HTTP status code.
- Add Response Delay — Simulate network latency by adding a delay (in milliseconds) before the mock sends a response.
- Simulate Rate Limiting — Simulate rate limiting by specifying a maximum number of requests allowed per minute.
- Chaos Mode — Randomly fails a percentage of requests with 5xx status codes.
If you enable both Simulate 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 Simulate Error Response or Chaos Mode.
-
(Optional) To clear the overrides for a mock and return to the scenario’s conditions, click
Reset.
-
Start a simulation and send requests to the mock server URL.
To start a simulation with the scenarios you’ve configured, see Start a simulation.