Reputation: 21
I am trying to simulate a scenario where two different users(with different credentials) log in simultaneously. This simulation will continue in a controlled number of iterations loop.
I am using the HTTP(S) Test Script Recorder to generate the Transaction controllers when I record my user interactions. I made two different Thread Groups to resemble each user with their separate Recording Controllers.
I first target one of the Recording Controller in my Test Script Recorder and then record myself logging in as user1
. This autogenerates an HTTP Authorization Manager with the credentials.
When I now log in as a different user and record myself this time targeting another thread it does not generate an HTTP Authorization Manager. I then created my own manually and saved it as a txt file. When i try and play the recordings only the auto-generated one works.
What can I do to have two concurrent threads log in as different users or use the same thread group and have it switch between the two login credentials.
Upvotes: 0
Views: 590
Reputation: 168002
You can put your credentials in the CSV file
username,password
user1,secret
user2,anothersecret
and add a CSV Data Set Config to read the credentials from the CSV file into JMeter Variables
Then in the HTTP Authorization Manager just use the JMeter Variables from the CSV Data Set Config:
This way each thread (virtual user) will the next line from the CSV file on each iteration and you will be authenticated as a new user.
Upvotes: 1