Defining Workload Profile

Applies to LoadComplete 4.97, last modified on May 20, 2019

When testing web servers, you may need to create a test in which the load varies dynamically during the test run. LoadComplete includes special features for creating this kind of load tests: “start delay” and “load profile”. These features let you create load tests where virtual users do not start working all together, but the load changes (grows or decreases) in time. For instance, the load test can start with simulating two virtual users, two more users may start one to two minutes after the test start, and so on.

There are several ways to define the load test workload profile in LoadComplete:

Start Delay

Each virtual user has the Start Delay property. It specifies the number of milliseconds after the test starts during which LoadComplete will not simulate a virtual user or a group of virtual users. You specify the start delay in the Start Delay column of the Load Test Editor.

To use the start delay to simulate the load increase, create several groups of virtual users in your load test and specify the increasing start-delay values for them. For example:

Specifying different start delays

The load test will start with simulating 8 virtual users (groups 1 and 4), half a second later, it will start 3 more users (group 5), in 10 second after the test starts, it will run 4 users (group 2), and in 250 seconds after the start, it will run 5 more virtual users (group 3).

Stepwise Load Profile

Setting the start delay for many virtual users may be time-consuming. In this case, it is easier to use the stepwise load profile.

The stepwise load profile allows simulating a workload that is increasing dynamically during the load test run. That is, a load test starts running with a specific number of virtual users and adds more virtual users in certain time intervals. For instance, a test starts working with 5 virtual users and adds 2 more users every 5 minutes of the run.

If you have several groups of virtual users in your test, the test will share the load among the groups. Each user the test adds to the load will be “taken” from a new group.

To enable the stepwise load profile for your load test, switch to the Load Profile tabbed page of the Load Test editor and select the Stepwise radio button. Specify the initial number of virtual users, the step period and how many users to add in each step:

Stepwise Load Profile Settings. This image was captured using LoadComplete Pro.

As you can see, there is no setting that specifies the maximum number of virtual users to be created. This number is determined by the number of virtual users that you have in the Virtual Users table of the Load Test Editor (that is, by the sum of the User Count column values).

If you are using a stepwise load profile along with the continuous load feature, and if the number of running users is less than the number required by the load test settings, LoadComplete will restart virtual users to achieve the specified load (that is, it will restart the virtual users that have already finished working).

Before the restart, LoadComplete can either clear or keep cookies that were saved for the users during their previous “sessions”. This is regulated by a certain LoadComplete setting that lets you emulate various real-world situations. See below.

Custom Shape Load Profile

When you need to simulate any particular kind of load: periodical, sinusoidal, exponential, zigzag and whatever other, use the custom shape load profile. This way, you can specify the desired workload visually:

  • Switch to the Load Profile tabbed page of the Load Test editor.

  • Select the Custom shape radio button.

  • Double-click the plot area, and in the ensuing dialog draw the graph of a load to be simulated.

The plot determines the dependency of virtual user count from the overall load test duration.

Custom Load Profile Shape. This image was captured using LoadComplete Pro.

You can only use the custom load profile when the continuous load is enabled, that is, when the total test duration is predefined.

When simulating a custom shape load, LoadComplete stops virtual users if their current number is larger than the number specified by the shape. It stops the users even if they have not completed scenarios. If the shape indicates subsequent growth of the load, LoadComplete will restart these virtual users at the needed time.

Use the Reuse virtual user cookies when simulating continuous load option to control whether LoadComplete should clear cookies collected for a virtual user during the previous session before restarting the user. See below for more information.

Specifics of Using Workload Profiles

  • The runtime order of virtual users can be different in different load profiles.

    In the Load Test Editor, virtual users are organized into groups, by rows. Users that belong to the same group have the same settings: scenario, browser, start delay, connection speed and so on. If the load test uses a steady load profile, LoadComplete starts simulating all of the virtual users defined in the load test simultaneously. Those virtual users who have the start delay specified simply wait until this delay is over and then starts working. All the virtual users that belong to the same group, start working at the same time.

    The situation is different when a test uses the stepwise or custom load profile. In this case, LoadComplete shares the load among virtual user groups. Each time a test adds a virtual user to the load, it “takes” the user from a new group.

    Let’s illustrate this by citing an example. Suppose, you have the following test and the following settings of the workload increase:

    Sample load profile settings

    When you run the test, it first runs 5 virtual users from the first group. In 30 seconds, it creates and runs two more virtual users: one from the first group and another from the second group. After 30 seconds more elapse, LoadComplete will create two more virtual users: one from the first group and another from the second. In 30 seconds, the test runs two users again: one from the first group and one from the second, and so on, until it runs out virtual users from the first group. Then, it will continue adding users from the second group.

  • The order of virtual users in a load test’s Virtual Users table is not important.

    If a load test uses the steady load profile, all virtual users start working at the same time. If a load test uses the stepwise or custom load profile, LoadComplete shared the load among virtual users. It iterates through the test’s virtual users groups and adds users to the load one by one from each group.

  • When you use the stepwise or custom load profile, the test will not ignore the start delays. It will use them together: a user starts working at start point defined by the load profile if the user’s delay period is over.

    The start delay effect
  • When you use a custom load profile or a stepwise profile with a continuous load, LoadComplete can restart virtual users during the load test run. The Reuse virtual user cookies when simulating continuous load option controls whether LoadComplete clears cookies collected for the virtual users during their previous “sessions”.

    If the option is disabled (by default), LoadComplete clears the cookies. This simulates a situation when a user comes to the tested web site for the first time.

    If the option is enabled, LoadComplete does not clear the cookies. This simulates a situation when the tested pages have some “history” about the user’s previous actions.

See Also

Creating and Configuring Load Tests
Load Testing With LoadComplete

Highlight search results