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 a mock has both Error response and Chaos mode applied, the error response takes precedence and chaos mode never triggers. This is the case even when the error response is a 5xx status code, such as 502. Rate limiting is checked first, so requests over the limit receive 429 Too Many Requests instead.

    To test random 5xx failures, use Chaos mode without Error response.

  6. (Optional) To return a behavior to the scenario’s value, click Refresh icon next to the behavior. This icon appears only for behaviors you customized.

  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.