Reputation: 1
I have a scenario like this..
One HTTP Sampler CSV File1 - en_gb, nl_nl CSV File2 - Fiat, Nissan, BMW
I want to test the HTTP sampler for the below combinations: First value of CSV File1 (en_gb), the sampler should loop through different values in CSV File2 like Fiat, Nissan, BMW, ..etc upto EOF
Next
Second value of CSV File1 (nl_nl), the sampler should loop through different values in CSV File2 like Fiat, Nissan, BMW, ..etc upto EOF
similarly... ... ... so on
How to achieve this in Jmeter? Appreciate your great help. Thanks
Upvotes: 0
Views: 36
Reputation: 168072
Just use 2 CSV Data Set Config elements like:
Add first CSV Data Set Config to read values like en_gb
and configure it like
Then add a Loop Controller and configure it to loop as many times as there are lines in the 2nd CSV file, it can be done i.e. via __groovy() function like:
${__groovy(new File('file2.csv').readLines().size(),)}
Then add another CSV Data Set Config to read values like Nissan
and configure it like:
That's it, refer values as ${var1}
and ${var2}
where required
Upvotes: 0