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

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.

Tue, 03/02/2021 - 22:03
Tarun Goswami is a highly experienced professional, currently serving as Technical Lead at a well-established IT services company. With over 12 years of experience across multiple domains, he demonstrates his expertise and passion for the industry through his engaging and informative blog writing in his spare time.