Reputation: 1
I have a jmeter script, in which I have added the CSV data set config element and I am passing 10 urls in the csv. Aim- is to have 70 users doing all the transactions starting from login to logout in each of the url. Example- first 70 users will test url1 Second 70 users will test url 2 and so on So in total I should have 700 users testing for the 10 websites. Could you please help on how I can achieve this.
I have tried to change the sharing mode in csv data set config by keeping the number of threads as 70. I am able to see that the same 70 users are going into each url and completing the transactions. I am expecting each url to have 70 users.
Upvotes: 0
Views: 26
Reputation: 168162
You can use __groovy() function to read the line from the CSV file which is equal to the current loop number of the Thread Group.
Something like:
${__groovy(new File('/path/to/your/file.csv').readLines().get(vars.getIteration() - 1),)}
This way all 70 users will read 1st line during 1st iteration, 2nd line during 2nd iteration, etc.
More information on Groovy scripting in JMeter: Apache Groovy: What Is Groovy Used For?
Upvotes: 0