Skip to navigation

Apply mock scenarios to a Postman simulation

Beta
View as Markdown

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.

  1. Open a workspace and select Tools > Stroke icon Simulations in the footer.

  2. Select the simulation you’d like to configure.

  3. (Optional) Update the mocks included in the simulation.

  4. 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.

  5. (Optional) To override a condition for the simulation, click Edit icon Customize for this simulation next to a condition, select a new value, and click Check icon 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 select 502, Chaos Mode only returns 502 responses.

    If your goal is to test 5xx failures, use either Simulate Error Response or Chaos Mode.

  6. (Optional) To clear the overrides for a mock and return to the scenario’s conditions, click Refresh icon Reset.

  7. 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.