понеділок, 4 травня 2015 р.

JMeter Variables

1. Define global variables
    - Test Plan (root element)
    - Config Element > User Defined Variables
2. Define virtual user variables
    - Pre processors > User Parameters
    - Config Element > CSV Data Set Config
3. Reference as ${variableName}
    - Can be used in nearly any property
    - Scope determined by location in hierarchy

Variables from a CSV file
1. Create a CSV file with the data you want to use    
     - No label row; save in same folder as .jmx file
2. Add "Config Element > CSV Data Set Config"
     - Add under the Thread Group that will use it
     - Set Filename = filename.csv
     - Set Variable names = username,password (e.g.)
 3. Set variables in HTTP Request "Send Params"
     - Name = username, Value = ${username}
     - Name = password, Value = ${password}
 4. Will read in data with each new thread, or with loops

Немає коментарів:

Дописати коментар