1
votes

I am learning JMeter and trying to do the following:

0) I only use 1 thread and only 1 loop

1) I have a CSV Data Set Config that loads a file with a bunch of strings (I am required to use CSV Data Set config)

2) I have a http request that responds with a web page. I need to make an assertion to it to verify if every string from the CSV is present on the page

I figured out that JMeter iterates to the next line in CSV file either for each thread or for each thread or loop.

But I only use 1 thread and 1 loop, and I don't want to repeat the whole test plan multiple times to verify if it contains multiple strings (it also does other stuff than this). How do I do this?

1

1 Answers

1
votes

The CSV Data Set Config only increments to the next line on the next iteration. If you want access to all(or several) values in the CSV file in the same iteration, you should probably use the __CSVRead() function. Or possibly even the __StringFromFile() function.

If you're just doing this as a one of exercise, you can also put all the values you need to check in 1 CSV line and read them as different columns.

Lastly you can use a while controller to read the next line from CSV Data Set Config as explained here.