Variance Profile

Applies to ReadyAPI 3.56, last modified on November 25, 2024

The Variance profile changes the number of virtual users (VUs load type) or the number of arriving virtual users (Rate load type) over time according to periodic functions.

API load testing with ReadyAPI: Variance profile

Click the image to enlarge it.

Depending on a load type, the Variance profile has different options. See the table below to learn more:

Load Type Option Description
VUs Base VUs The mean number of users simulated during the test.
Amplitude The difference between the minimum and maximum numbers of simulated users in percentage of Base VUs, rounded up.
Variance type See the Variance Types section.
Cycle time The time to complete one full cycle.
Wait time The time to wait before restarting a virtual user.
Rate Base Arriving Users The mean number of users starting the test per unit of time during the test.
Amplitude The difference between the minimum and maximum numbers of users starting the test.
Variance type See the Variance Types section.
Cycle time The time to complete one full cycle.

Amplitude

In the Amplitude field, you set the peak to peak amplitude in percentage of the base load value. So, if you simulate 20 virtual users and set Amplitude to 50%, the load test will have the amplitude of 10 and go from 15 to 25 virtual users. If you set 200% Amplitude, the test will have the amplitude of 40 and go between 0 and 40. If a part of a load shape is below 0, no requests will be simulated until the load is above 0.

Variance types

When using the Variance profile, you can shape the load in several ways. For example, if the number of users is set to 20 VUs, Amplitude to 100%, and Cycle Time to 60, here is how the number of virtual users will change assuming that the server handles the load:

  • If the Saw-tooth type is chosen:

    1. First, the load increases from 10 to 30 users within 60 seconds;

    2. Then, it drops back to 10 and increases again during the next minute.

  • If the Sine-wave type is chosen:

    1. First, the load increases from 20 to 30 users within 15 seconds;

    2. Then, it decreases back to 20 users within 30 seconds;

    3. It continues decreasing from 20 to 10 users within 45 seconds;

    4. And, it goes back up to 20 within 60 seconds.

  • If the Square type is chosen:

    1. The test starts with 10 users and keeps the load for 30 seconds;

    2. Then, the load goes up to 30 users until 60 seconds;

    3. And, it goes back to 10 users afterwards.

Load generation specifics

Due to the way ReadyAPI generates data, the actual simulated load may be slightly different from the one you specified. These differences are inconsequential for most tests, but if you need a very specific load, use a different load profile or a combination of load profiles.

Sample load tests

Here are some sample tests using this profile:

API load testing with ReadyAPI: Variance profile graph

Click the image to enlarge it.

These tests are similar to the example described above, but they use the Rate load type – Base Arriving Users is set to 20, Amplitude – to 100%, Cycle Time is 60. The test duration is 2 minutes or two full cycles.

See Also

Fixed Profile
Random Profile
Burst Profile
Ramp Up Profile
Ramp Sequence Profile
Custom Profile

Highlight search results