Logo
2023.9.19

Test Plan

Virtual user

Load testing begins with the concept of a virtual user. Given the importance of this concept, we will describe how it works in our tool.

InfoA virtual user is a sequence of actions that emulates the actions of a real user or an API client running cyclically.

In order for a virtual user to create a real load, the pauses between actions must also be real.

Plan

TestPlan

For a quality load test, it is necessary to make a plan. You've already read about it in smart articles about testing.

The plan consists of stages (whatever you call them). The stages of the test plan are performed sequentially.
After the completion of the project, you will receive the results for the entire project and each stage separately.

Stage

StageThe GeekLoad also has stages. You don't have to look for something to replace them with.
In general, the stage describes the behaviour of several groups of virtual users at the same time.

In the simplest case, the stage describes a list of scenarios for parallel execution during a given time and the number of virtual users executing each scenario:

Loading...

.users

The base number of virtual users.

This parameter is optional. The number of virtual users can also be set in groups or profile shapes.
Unless otherwise specified, this amount is used for each group in the stage.

.profile

Graph of the dependence of the number of virtual users on time.
In the simplest case, you can specify only the duration. This means a constant number of virtual users during the specified duration.

Shapes are used for a detailed description of the profile. See advanced profile usage.

This parameter is optional. The profile can also be set in groups.
Unless otherwise specified, this graph is used for each scenario in the stage.

.groups

List of virtual user groups. To describe the group, you can use the scenario name or a special object Group.

InfoRunning a stage containing only one group can be replaced by running this group separately.

Group

The group describes the behaviour of several virtual users executing the same scenario in parallel.

Loading...

The Group can be run separately from the stage. This is equivalent to running a stage with a single group – the current one.

Loading...

.scenario

The scenario is a usual function with no parameters. It describes the behaviour of one virtual user during one iteration.
To specify a scenario, you can use a string with its name or its identifier.

.users

The number of virtual users who will execute the scenario specified in this profile. You can specify an absolute number or a string indicating percentages of the base number of virtual users specified in the stage.

This parameter is optional. The default value is equal to the number of virtual users specified in the stage.

.profile

Graph of the dependence of the number of virtual users on time.
In the simplest case, you can specify only the duration. This means a constant number of virtual users during the specified duration.

Shapes are used for a detailed description of the profile. See advanced profile usage.

This parameter is optional. The default value is equal to the profile specified in the stage.

.distribution

Sets the relative value of the total number of virtual users of the group at each time for different farms (locations).

Loading...

Read more about the description in the article about clouds and agents.

Advanced profile

The profile is described the same for stages and groups.
The advanced profile consists of shapes, each of which describes a part of the graph of the dependence of the number of virtual users on time.
The duration of such a profile is equal to the sum of the durations of the shapes included in it.

Loading...

Shapes

All shapes have 2 common properties:

Parameters
target
duration
:
:
string | number
string
- Target value.
- Duration of the shape.

During the work of the shape, the value changes from the target value of the previous shape to the target value of the current shape.
For the first shape, the initial value is zero.

.line

Linear change of value.

.smooth

S-shaped curve of value change.

.step

This shape has an additional property step - the magnitude of the value change.
Stepwise change of the value by step each period duration.


© House of Geeks 2024
Telegram