I have created a test that reads the users from a CSV Data Set Config in JMeter. For example when i run a test, JMeter reads first 20 users in the CSV file. Then if i will run the same test again, JMeter again reads the first 20 users in the CSV file. But i want JMeter to read 20 users but must start the reading from 21st user, and so on. Is there a way to make this possible?
1 Answers
0
votes
As per CSV Data Set Config documentation:
By default, the file is only opened once, and each thread will use a different line from the file. However the order in which lines are passed to threads depends on the order in which they execute, which may vary between iterations. Lines are read at the start of each test iteration. The file name and mode are resolved in the first iteration.
So there is no way to specify the "offset" for reading the file, the options are in:
- Use __CSVRead() function where you can call
${__CSVRead(/path/to/your/file.csv,next)}as many times as needed to "skip" the lines which are already "used" - Use setUp Thread Group and JSR223 Sampler to remove first 20 lines from the CSV file programmatically
- Go for Redis Data Set config instead where you have
Recycle Data on Useoption, if you set it toFalsethe "used" data will be removed