Value list variables

A variable may be define with an associated set of values. They are used by the GENERATE and NEXT commands, which allows the variable to be assigned a value from the list, either randomly (using GENERATE) or sequentially (using NEXT).

To create a "Value list" variable:

  1. Click on the "Insert/Modify Variable" icon or select the "Tool/Insert Modify Variable" menu. The "Variable Properties" window will open.
  2. Select the "Value List" option:


     
  3. Click to manually add a value in the value list (value must employ escape sequences),
    Select entries in the value list and click to remove them from the list,
    Click to automatically generate a list of values,
    Click to import values from a database,
    Click to import values from a file.
     
  4. By default, a value list variable will be declared in the script as following:

    String LOGIN {"login1", "login2", "login3", "login4"};

    If the value list contains a large number of values, it is preferable to save the values in a file. To save the values in a file, check the "Create in file" option and enter a file name (or select an existing one) in the drop-down list (Data files are located in the Repository\Data directory).

    The variable will be declared as following:

    String LOGIN FILE="LOGIN";

     

  5. Leave the "Generate Next Command" option checked; A NEXT command is automatically inserted at the beginning of the script. It allows each user to use a different LOGIN value.

Generate values

Click to automatically generate a list of values. The Generate values window is opened:

Fill the "Prefix", "Suffix", "Nb Values" and "Increment" options and click "OK" . The generated values have the <prefix><identifier><suffix> format. The <identifier> is calculated using the Increment From and Step options.
"Prefix" and "Suffix" must employ escape sequences.  

Import values from database

Click to import values from a database. The Database wizard is opened:



Select an ODBC data source from the "Data Source" drop-down list, a login, a password and then click Next. The "Query" dialog will appear:



Two options are available to import values from the database:

Query:

  1. Select the Query radio button, type a SQL statement with only one column and click Next.



  2. The "Maximum Row Number" dialog box displayed will specify the maximum number or rows to retrieve.
    Select the:
    • All radio button to get all rows or
    • Maximum  radio button to specify a maximum row number value

    and click Next.


  3.  

  4. Click Finish; Values are inserted in the value list.

Table

  1. Select the Table radio button and click Next. The Table And Columns dialog box will open:



  2. Select an Owner, a Table and a Column (i.e. Owner SCOTT, Table EMP, Column ENAME) and click Next.
  3. The "Maximum Row Number" dialog box displayed is used to specify the maximum number of rows to retrieve.
    Select the:
    • All radio button to get all rows or
    • Maximum  radio button to specify a maximum row number value

    and click Next.


  4.  

  5. Click Finish; Values are inserted in the value list.

Import values from a file

  1. Click to import values from a file,

  2. Select a text file in the opened file dialog,

  3. values contained in the selected file are added in the value list.

     

See also:





Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap