Syed Umar AnisSoftware EngineeringJMeter: Use multiple user logins for load testing
Syed Umar AnisSoftware EngineeringJMeter: Use multiple user logins for load testing

Thread Group simulates a number of virtual users putting the load on the server. Often one of the initial requests is user login and depending on the user credentials specified in the login call, all threads will be using the same login.

If you want each thread spawned by the Thread Group to use a different login, you can use the CSV Data Set Config.

In the filename field (see screenshot above), you have to specify the name of a CSV file with usernames and passwords. Variable Names (user, password) are variables that will hold the values from the CSV file.

Each thread from the Thread Group will use a different row from the CSV file. The first thread will have the first row, the second will have the second and so on.

We can use these variables in the login call so that each thread has a different user login.

The format of the CSV file used for the user’s list is very simple. It should have two columns – the first one with usernames and the second with passwords. It should look something like this.

If the number of users in the CSV file is less than Thread Group users, it will keep going back to the top of the file after reaching the end. This behaviour can be controlled through ‘Recycle on EOF‘ flag in the CVS Data Set Config component.

Further Reading

Hi, I’m Umar

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *