Variables

Variables are used to add dynamic content to a scenario.

They may be combined with other variables or with static content (e.g. ${product_${productID}}) and used in a number of places, such as in form parameter values.

Example

Defining 5 variables: a Constant variable, a File variable, a Counter variable, a RandomNumber variable and a JavaScript variable.

Constant variable

A string the value of which cannot be modified.

NameDescriptionAccept variableRequiredSince
nameThe variable name- 
descriptionThe variable description-- 
valueThe variable value- 

Example

Defining a Constant variable.

File variable

A list or table of values loaded from a text file.

NameDescriptionAccept variableRequiredSince
nameThe variable name- 
descriptionThe variable description-- 
column_namesThe list of column names. Use ${<variableName>.<columnName>} to access variable values.-If is_first_line_column_names is false 
is_first_line_column_namesIf true, the first line of the file can be used as column headers name.
The value of this parameter is ignored if column_names parameter is specified.
The default value is false.
-If column_names is not present 
start_from_lineThe default value is "1".-- 
delimiterThe delimiter is used to separate data columns.
The default value is ",".
-- 
pathThe relative (compared to the NeoLoad project folder) or absolute path of the source file.- 
change_policyThe policy when the value must change. The "change_policy" value can be:
  • each_use
  • each_request
  • each_page
  • each_iteration
  • each_user

The default value is each_iteration.
-- 
scopeThe value scope can be:
  • local
  • global
  • unique

The default value is global.
-- 
orderThe values can be distributed in a set order. The value of order can be:
  • sequential
  • random
  • any

The default value is any.
-- 
out_of_valueWhen no values are left, several policies can be applied. The value of "out_of_value" can be:
  • cycle
  • stop_test
  • no_value_code

The default value is cycle.
-- 

Example

Defining a File variable.

Counter variable

A numerical variable having a start value, an end value and an incremental value.

NameDescriptionAccept variableRequiredSince
nameThe variable name-6.10
descriptionThe variable description--6.10
startThe variable start value-6.10
endThe variable end value-6.10
incrementThe variable increment value-6.10
change_policyThe policy when the value must change. The "change_policy" value can be:
  • each_use
  • each_request
  • each_page
  • each_iteration
  • each_user

The default value is each_iteration.
--6.10
scopeThe value scope can be:
  • local
  • global
  • unique

The default value is global.
--6.10
out_of_valueWhen no values are left, several policies can be applied. The value of "out_of_value" can be:
  • cycle
  • stop_test
  • no_value_code

The default value is cycle.
--6.10

Example

Defining a Counter variable.

Random Number variable

A random numerical value within a value range.

NameDescriptionAccept variableRequiredSince
nameThe variable name-6.10
descriptionThe variable description--6.10
minThe variable min value-6.10
maxThe variable max value-6.10
predictableWhen true, randomly generated values will have comparable values for two identical tests.e--6.10
change_policyThe policy when the value must change. The "change_policy" value can be:
  • each_use
  • each_request
  • each_page
  • each_iteration
  • each_user

The default value is each_iteration.
--6.10

Example

Defining a Random Number variable.

JavaScript variable

A variable whose value is the result of the execution of a JavaScript script.

NameDescriptionAccept variableRequiredSince
nameThe variable name-7.2
descriptionThe variable description--7.2
scriptThe JavaScript script-7.2
change_policyThe policy when the value must change. The "change_policy" value can be:
  • each_use
  • each_request
  • each_page
  • each_iteration
  • each_user

The default value is each_iteration.
--7.2

Example

Defining a JavaScript variable.