NeoLoad – List Variable

‘List’ is a type of variable in NeoLoad to define the values of the variable in a list. NeoLoad replaces the variable, used in the script by picking the values from the defined list. The ‘List’ variable type also provides an option to add multiple columns where the dependent value set can be easily used. The specific use of the ‘List’ variable type is to define the name, address, ID, account number, order number etc.

Example: A dependent value set of First Name, Last Name and Employee ID.

The only disadvantage of the ‘List’ variable type is that you have to add the column and respective values manually, else you can use the ‘Import dataset’ option where the pre-defined data formats and values are available.

Inputs of ‘List’ type variable

  1. Name: To provide the name of the variable to be used in the script. This is a mandatory input.
  2. Description: To describe the use of the variable. This is an optional input.
  3. Values: To specify the test data
    1. Starting from line: To define the starting row of the table. The data will be picked from the defined row onwards. The input type is integer number Example: 1, 5, 10 etc. This is a mandatory input.
    2. Import dataset…: To select pre-defined data of specific format
    3. Add Column: To add a new column in the table for dependent data
    4. Remove Column: To remove the existing column from the table. Just click on column name and press remove button.
    5. Add Value: To insert a new row
    6. Delete Value: To delete the selected row
  4. Value change policy: To define the setting when the next row (data) will be picked
    1. On each use
    2. On each request
    3. On each page
    4. On each iteration (Default value)
    5. For each Virtual User instance
  5. Variable values distribution policy: To define the scope and distribution setting of the variable
    1. Scope: The available values are:
      1. Local
      2. Global (Default Value)
      3. Unique
    2. Order: The available values are:
      1. Sequential
      1. Random
      2. Any (Default Value)
    3. When Out of Values: The available values are:
      1. Cycle values (Default Value)
      2. Stop the test
      3. Return the value “<No Values>”

Example

Consider, a login page has User Name and Password fields to authenticate a user and give access to the application. Now, to parameterize the User Name and Password fields, we can use the ‘List’ type variable. First of all, we need to provide the name of the variable in the ‘Name’ field (say ‘Credential’) then add two columns named ‘userName’ and ‘passWord’. After creating the columns we can add the appropriate values in the rows under respective columns. The ‘Value change policy’ is set to ‘on each iteration’ with Global scope, Sequential order of test data and in a cyclic manner, when out of data situation occurs. Refer to the below screenshot of how this scenario will be illustrated.

NeoLoad - List Type Variable
Figure 01

To pick the value from the list, we need to write ${<variable name>.<column name>} in the script.

Example: ${Credential.userName} & ${Credential.passWord}

NeoLoad - List Variable
Figure 02

Note: You can also validate the variable by using the ‘Test’ option. The variable should return the value from the list.

NeoLoad - List Variable
Figure 03

You may be interested:


Leave a Reply

Your email address will not be published. Required fields are marked *