Imagine a test with multiple test cases that will run over multiple load generators. This article will go over how to count how many Virtual Users (VUs) will execute each test case in a DMTC.
Note
This article refers to multi-test case tests, but the same principals apply to tests with test case groups.
Rule of thumb
Before a test starts, StresStimulus allocates VUs between load generators and test cases in the following order:
- Allocate VUs between load generators according to each generator's mix weight.
- Within each load generator, allocate VUs between each test case according to each test case's mix weight. The test case mix weight on the load generator is called Gen Mix Weight.
Note
Starting from v5.2 each test case can have a different mix weight for every load generator. This gives more flexibility for distributing VUs in a distributed test.
Determining mix weights
Let's take a test that will have a maximum load of 1000 VUs between 4 test cases running across 3 load generators (named East, West, Local). Below is an example of desired VU distributions between the test cases.
Test Case | Desired VUs | Percent |
---|---|---|
View Store | 350 | 35 |
Search Store | 475 | 47.5 |
Place Order | 125 | 12.5 |
Return Item | 50 | 5 |
Click the Configure VU distribution > By Load Agent - TC... button to bring up the VU configuration dialog
Distribute VUs between load agents
According to the rule of thumb, first, the 1000 VUs are distributed between load agents. In the dialog, select the All Load Agents node and modify the Mix Weight column on the left. The VU Distribution column shows the actual number of VUs that will be executed on the agent.
Tip When the sum of the mix weights equal sum of VUs to distribute, then the individual mix weights equal the individual VU distribution. |
|
Distribute VUs between test cases
Now that the VUs have been distributed between the load agents, the test case distribution can be configured on each agent individually.
East (500 VUs) | West (300 VUs) | Local (200 VUs) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
Select an agent node to modify the test case mix weights
East (500 VUs) | West (300 VUs) | Local (200 VUs) |
---|---|---|
Note
In the above example, the test cases Place Order and Return Item will not run on the West since their mix weights are 0 for that load agent.