Input data file(CSV) to the test script in JMeter

Profile picture for user devraj

CSV is most oten used to input data into JMeter test scripts. The CSV Data Set Config is used to read lines from a file and to split them into variables. Follow below steps to read from csv:

Step 1: Right Click on Plan. Click on Add->Config Element->CSV Data Set Config

Step 2: Enter FileName. Use complete path if you are not in bin directory.

Step 3: Enter Variable Name. This is equal to column name in CSV.

Step 4: Enter Delimeter. Comma is Default you can use any other.

Step 5: Create New Login HTTP Request

Step 6: Enter Path of Login page

Step 7: Set Method to Post

Step 8: Set Parameter and give variable names. $ means these are variable not values.

Step 9: Select "URL Encode?" checkbox

Step 10: Run your script

You can view password read successfully using request tab of view Result Tree Listener.