Use schedule stages to set the user load


+

Search Tips   |   Advanced Search

 

Overview

By setting stages, you can...

Each stage, which lasts a specific amount of time and contains a specific number of users, defines a different load.

When a schedule contains stages, place the tests in the schedule in an infinite loop...

This prevents virtual users from finishing the stage before the allotted time.


Add stages to a schedule

  1. In the Test Navigator, browse to the schedule and double-click it.

    The schedule opens. By default, the User Load page contains one stage with 5 users. The 5 users run until finished.

  2. On the User Load page, click Add.

    The Create User Stage window opens. Enter the information for a schedule stage, and click OK.

    Option Description
    Number of users Total number of users in the stage. This is not the number of users to add to or to remove from those currently running; it is the total number of active users at this stage.
    Stage Duration Length of time (and the time units) for the stage to run. Once Number of users is achieved, the users will run for up to this time. When the time expires, the users continue to run if they are needed for the next stage, or, if not, they are stopped gracefully.
    Rate of Change When changing the number of users, the amount of time to delay between adding or removing each user.

    Add or removing all users over a time period changes the users in a uniform random distribution over the time specified for changing users, which is the time before the settle and the stage begin. This slight variance closely emulates human behavior.

    Add or removing one user each time unit adds the same delay for each user. Although this option does not emulate human behavior as closely as the first option, it is useful when adhere to a certain rate because of limitations of the system under test, such as the time it takes for a user to log on to the system.

    Settle Time Once the desired user population has been reached, a system might still experience a period of flux in reaction to the change in user population. Setting a settle time allows the system to re-establish its steady-state equilibrium so that it can accurately reflect the user population.

    The Stage Duration starts after the settle time expires. The settle time is not counted as part of the stage duration proper, nor are the settle-time metrics included in the Compare report, which is generated at the end of the run. However, settle time does affect how long a schedule runs, because it adds time to the beginning of each stage. And, although the Compare report does not include the settle-time metrics, these metrics are collected and you can include them by changing the time range of the report.

    If system does not have significant flux or if the stage is long enough that the flux comprises only a minor part of it, you might not need a settle time.

  3. On the User Load page, modify the stages as necessary:

    1. Click Up or Down to change the order of the rows.

    2. Double-click a row to modify it.

  4. Select the Time limit for a user to respond to a stop request value.

    If a stage contains fewer virtual users than its predecessor, the excess users are asked to stop. This value gives a stopped virtual user extra time to complete its current action (such as an HTTP request). If the virtual user cannot complete its action before the time limit expires, it is forced to stop. Note that a long time limit might delay the next stage.

  5. Select whether you want the last stage to run until all work completes.

    You typically leave this box cleared and put the users in an infinite loop to let the stage run until the tasks are finished.

    Last stage set to run until all work completes? Tests in infinite loop? Results
    no yes Typical case: The run ends when the last stage ends.
    yes no Most common reason for selecting this combination is that a schedule has one stage and to run all work to completion (equivalent to a schedule without stages). Setting these options for a multi-stage schedule runs the risk that the schedule will run out of work and stop before completion.
    yes yes Not advisable: Schedule runs until you stop it.
    no no Not a typical case: Useful for running a single-stage schedule and stopping the run at a specific time, whether or not virtual users have completed the workload.

  6. Examine the User Load Preview to verify that the stages are set correctly.

    The red line segments indicate that the total number of users has been achieved for the stage and the settle time, if any, has ended. The following figure illustrates a schedule with two 16-minute stages. The second stage has a 4-minute change rate and a 4-minute settle time:

  7. Run schedule. Each stage should be delineated at the top of each performance report.

    In this example, two stages are shown, with the red lasting for 6 minutes and the blue lasting for 10 minutes.


What to do next

You can display a Compare report, which compares the time ranges of each stage, when the run is complete. This report provides a quick side-by-side analysis of how the system under test performs under various user loads.

To display a Compare report, right-click the test results and select...

To display a Compare report automatically at the end of each staged schedule run, click...


Related

  • Schedule overview
  • User group overview
  • Create a schedule
  • Add a test to a schedule
  • Define performance requirements in schedules
  • Repeat tests in a schedule
  • Delay virtual users or actions
  • Run tests at a set rate
  • Run tests in random order
  • Add a transaction to a schedule
  • Synchronize users
  • Emulate network traffic from multiple hosts


    Related reference

  • Schedule properties