0
votes

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

1

1 Answers

0
votes

Just use 2 CSV Data Set Config elements like:

  1. Add first CSV Data Set Config to read values like en_gb and configure it like

    enter image description here

  2. 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(),)}
    
  3. Then add another CSV Data Set Config to read values like Nissan and configure it like:

    enter image description here

  4. That's it, refer values as ${var1} and ${var2} where required

    enter image description here