I'm new to Jmeter and am trying to use variables from a CSV file in the path of my HTTP GET request.
I've looked through various tutorials and answers to this question, but I still can't figure out what I'm doing wrong. The file just has one header (ID). It works if I enter the ID in the path, but as soon as I try read it from the CSV file, it fails:
Your configuration looks good, double check jmeter.log file for any suspicious entries.
Other recommendations:
Given you have only a single column it might be easier to use __StringFromFile() function directly in the HTTP Request sampler body like:
/api/Users/${__StringFromFile(c:\\Automation\\Test.csv,,,)}
Content-Type
and Authorization
should go in HTTP Header Manager , not in the request parametersSee Testing SOAP/REST Web Services Using JMeter article for more details.
The problem wasn't with the reading of the variable. I thought that the first line of the file would be treated as a header, but it reads the first line of the file as a variable, so my file looked like:
ID 001
It read "ID", when I wanted it read "001.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.