I read many answers around regarding this topic, but I couldn't find the right one for me.
Requirements:
- I have 2 threads/users
- I have two entries in CSV Data Set Config for login.
The number of users will always be the same as the CSV rows.
My test looks like:
Thread Group
- Homepage
- Loop Controller
- ---Login
- ------CSV DataSetConfig
- [another http call]
If I set number of threads 2 and Loop to 2 I get in Tree:
- Homepage1
- Login user1
- Login user2
- Homepage2
- Login user1
- Login user2
If I set number of threads to 2 and Loop to 1 I get:
- Homepage1
- Login user1
- Homepage2
- Login user1
If I set number of threads to 1 and Loop to 2 I get:
- Homepage1
- Login user1
- Login user2
I also tried to put the CSV Data set in the thread group before the login call. If I set 2 users to start the flow, always pick the first row from CSV.
What I need:
- Homepage1
- Login user1
- Homepage2
- Login user2
- Each user should continue it's flow
I could try to setup two Thread groups with specific user login, but it's not feasible because I want to increased the number of users and it's not maintainable. As an overview, I have 4 flows and 200 users. After I solve this problem I will think about the user variability.
If anybody knows how to do it or can point me to the right info, please do so. Thanks a lot.
Create your csv like,
replace above values in your script for homepage and user login and use one line per thread (which is present in csv config)
so each thread will use whole line1 i.e. homepage1,user1 and will run as per your requirement. That should resolve your issue.
Just remove your loop controller, and put your csv file at the top of the testplan. Then set a synchronizing timer after the Login statement and set it to the max users.
Now all your users should login with a different value from csv value if there are enough, plus they will all continue at the same time waiting for all to login first.