Run Multiple Scenarios

Applies to ReadyAPI 3.51, last modified on March 21, 2024

About

Virtual users simulate client actions on the tested server. To do this, each virtual user runs a user scenario – a sequence of targets, or ReadyAPI Test test cases.

In the simplest case, all the virtual users of a load test run one scenario, that is, they simulate the same client behavior. To make a load test more realistic, you can use different scenarios in a test. This helps you simulate different behavior patterns in the same test, for example, some users will add goods to their carts, while others will send queries on price changes.

You can also combine multiple load scenarios, for example, to simulate a steady increase to the peak number of users on the server during a lengthy soak test.

Add a scenario

To add a scenario to your load test:

  • In the load test editor, click Add Scenario below the existing scenarios.

    – or –

    While a load test editor is open, click on the main ReadyAPI toolbar.

  • Enter the scenario name in the subsequent dialog box:

    Adding a scenario to a load test

    Click the image to enlarge it.

By default, a new scenario includes the first test case found in your ReadyAPI project, and uses the Fixed load profile and 5 VUs.

Copy scenario configuration

To copy the configuration of one scenario to another scenario:

  • In the load test editor, right-click the scenario the configuration of which you want to copy and select Copy Scenario Configuration.

  • Right-click the scenario to which you want to paste the configuration and select Paste Scenario Configuration:

    Paste scenario configuration

    Click the image to enlarge it.

Note:

ReadyAPI copies the following options:

  • Load profile

  • Load profile settings (VUs, timings)

  • Scenario-level assertions

Scenario configuration: copied options

Click the image to enlarge it.

Assign virtual users to scenarios

After you create a scenario, you can specify virtual users that will run it. The way you do this depends on the Load Allocation setting on the toolbar. You can either set a load for each scenario individually, or specify some base number and then set a portion of this value for each scenario:

Load Allocation setting

Click the image to enlarge it.

For complete information, see Set Virtual User Number.

Rename a scenario

  • In the load test editor, right-click the needed scenario and select Rename Scenario from the context menu.

    – or –

    Select the scenario in the load test editor, and then click the scenario name in the property editor on the right:

  • Enter a new scenario name in the subsequent dialog box:

    Rename a scenario

    Click the image to enlarge it.

Delete a scenario

Right-click a scenario in the load test editor, and choose Remove Scenario from the context menu:

Remove a scenario
Note: If you have several scenarios to remove you can select them while holding Ctrl.

See Also

Setting Up Load Tests
About Targets
Load Scheduler

Highlight search results