Create and define a CSV variable

Declaring and using variables is the usual way of achieving dynamic behavior with NeoLoad. A variable can be used in place of constant or static values for many configuration elements. In this example you will use a File Variable, a variable that takes its values from a CSV (Comma Separated Values) file. An alternative would be to use a List Variable and explicitly define the values in the Variables dialog box. This alternative is put aside in this example.

  1. Select Variables in the Edit menu.
  2. Open the Variable Creation dialog box: Click on the New variable button in the Variable Edition dialog box.
  3. Select the type of variable to create: Choose the File type.
  4. Enter a name for the variable:
  5. Check the column separator: You can specify a column separator other than the default ";" character.
  6. Define in what order the values of the variable will be used:
  7. Define when a new value will be used: In this case, you may want a new value to be used each time a Virtual User logs in so you select the For each Virtual User option.
  8. Close the Variables Creation dialog box and test your variable:

In the example, choosing the Change Virtual User action will result in a new value for the login column. The value is randomly chosen among the values of the login column. This is consistent with the way you may have defined the accounts variable: you may want a new login value each time the Virtual User changes in the scenario. Testing with other actions, such as the "Change Page action", will not change the value of the variable.

If you wanted to test the password value of the "account" variable, you would change the expression to ${account.col_1}.

At this stage, the "account" variable is ready to be used and tested.