I'm using jmeter version 5.4.1. My load test script uses csv file which contains a lot of users. I want unique user on each thread but same user on each iteration of thread group as I want to restart thread group when some specific condition occurs with same user. All the solutions I have tried reads the next line from csv file and logins with new user instead of previous one.
The solutions I have tried are:
Can anyone please help me with this?
If you're using CSV Data Set Config - it is not possible, the next value will be taken on the next iteration and there is no way to "reset" it to the specific location, only continue where it left off or start from the beginning.
Consider alternative options of reading the usernames, i.e.:
CSVRead() function which will proceed to the next row only when you explicitly call ${__CSVRead(your-file.csv,next)}
__groovy() function where you have full control on which line to read, for example:
${__groovy(new File('test.csv').readLines().get(0),)}
- read first line${__groovy(new File('test.csv').readLines().get(1),)}
- read second line