Reading data from CSV or excel file in JMeter
Apache JMeter is one of the best open source load testing tools available in market. We had covered Load Testing Using Apache Jmeter in our previous post.
In this post I will go into some more details as how you can read data from csv or text file for Jmeter. This is helpful when you are doing a load test and need unique user id or any other parameter.
CSV Data Set Config settings in Jmeter console
This file will reside in bin directory of your Jmeter directory.
userid is the variable you will be using in your url for eg
http://www.abc.com/welcome.jsp&userid=${userid}
How your Myfile.csv file will look like ?
1234
1245
1257
and so on
if you want multiple parameters, you can have comma separated values like
1234,88
1245,99
1257,44










Put csv file in the same directory as your test plan, not in “bin”
Put csv file in the same directory as your test plan, not in “bin”
@Kishore
Hi,
Copy the csv file in the same directory as your test plan
My csv file is in “bin”. I was able to perform the FTP request from the “Local file” path manually creating 180 FTP requests in the Jmeter script. But when I tried to use CSV dataset config, I was unsuccessful..
@Vinay
Kishore
The problem might be spaces in “Documents and Setting”.
Is the csv file in bin directory of your Jmeter ?
Hi,
I was trying to use CSV dataset config in my FTP test. But I was unsuccessful. I have around 180 text files that need to be transferre to the remote server. So my Local file and remote file fields in FTP request I tried to use the variable for file name as below
Local file– C:\Documents and Settings\ky\Desktop\KK\${Name}
Remote file– /TestPerf2/${Name}
and in CSV dataset config I have set variable name as “Name” and delimer aas “,” and I have a csv file in “bin” with all the file names from my local file location.Is there something wrong with the way I declared variable or does this not work for FTP request test?
Please help!!!
Hi,
Thanks
Hi,
Thanks it helped me a lot.
Thanks for the info… It was useful to start up with CSV Data Set Config