Skip to navigation

Apply scenarios and behaviors to a simulation

View as Markdown

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.

  1. Open a workspace and select Tools > Stroke icon Simulator 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 Scenario dropdown list to choose a scenario. The scenario’s behaviors are shown, along with the value for each.

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

    If your goal is to test 5xx failures, use either Error response or Chaos mode.

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

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