The Variable wizard guides you through creating and configuring project variables for your tests. You can use them to provide your tests with dynamic values. This way, you can achieve a realistic load test behavior and prevent various server caches from affecting the test results.
LoadComplete shows the wizard when you do one of the following:
-
Click the New Variable button on the toolbar of the Variables Editor.
-
Select New Variable from the context menu of the Variables editor.
-
Click New Variable in the Select Variable dialog.
The wizard includes a series of pages where you can specify the variable’s various parameters.
Specify Variable Name Page
On this page, you can specify the name of the variable you are creating. This name will be used to refer to this variable in request parameters. The variable names can consist only of letters (A..Z, a..z), digits (0..9) or underscores ( _ ).
It is recommended that you give variables meaningful names that reflect their role in the load test. This will help to make your test easier to maintain. For example, if you are going to use a variable to store logins to be used by your virtual users, call the variable Login.
Once you have entered the variable name, click Next to proceed.
Select Variable Type Page
On this page, you can select the variable type. The type defines the source of the variable value (or values).
You can choose from the following types:
-
LoadComplete variable - One of LoadComplete internal variable types (that is, it is not bound to external data files). If you want to use this option, click Next and then select the needed variable type:
-
List variable - A variable that holds a list of values (for example, user names or passwords) and returns different values from the list on each use or for different virtual users.
-
Incremental variable - A variable that has an initial value and increments its value at certain time periods. The values can be integer numbers or dates.
-
Random variable - A variable that returns a random number or date within the specified range. For example, a random date from 01/01/1970 to 12/31/1990.
-
Constant value - Holds a single number, string or date. This value does not change during the test run.
-
Current date value - Returns the current date and/or time in the specified format.
-
-
Database variable - A variable that is linked to a specific database field and returns different values from that field on each use or for different virtual users.
-
Excel variable - A variable that is linked to a column in an Excel sheet and returns different values from that column on each use or for different virtual users.
-
CSV variable - A variable that is linked to a field in a CSV file and returns different values from that field on each use or for different virtual users.
-
File variable - A variable that returns the contents of the specified file. Typically, you use File variables to copy and install client certificates on remote computers where you simulate virtual users. To learn more, see Certificate Authentication.
Once you have selected the variable type, click Next.
Other Pages
On the next pages of the wizard, you can specify various parameters specific to the variable type. The contents of these pages vary depending on the variable type you have selected on the wizard’s previous page. For more information about the parameters available on these pages, please refer to the description of the corresponding variable type (see the links above).
Once you are done, click Finish to complete the variable creation. If you need to go back to the wizard’s previous steps and review or modify the settings, use the Back button.
See Also
About Variables
Creating, Modifying and Deleting Variables
About Variables Editor