Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JMeter: Using multiple CSV files and multiple HTTP sampler for each User in a single Thread Group

Tags:

http

csv

jmeter

The following is the scenario I want to run in JMeter: I have one CSV file (file1.csv) containing 100 userIds and passwords. I have created a Thread Group containing 100 users. I want each user to read one row of userId and password from file1.csv. For this I have added a CSV File Config element. Now, I want each of these users to read another CSV file (file2.csv) containing 500 rows. Each row contains parameters for a HTTP request.

So, I want each User to read one set userId, password from one row of file1.csv and with that one set the User with fire HTTP request 500 times, each time reading each row of file2.csv.

Can you please tell me how to design this in JMeter?

like image 715
kajarigd Avatar asked Mar 19 '23 04:03

kajarigd


1 Answers

I would implement it with the following test plan structure:

  • Thread Group (100 threads)
    • Loop Controller (500 iterations)
    • HTTP Request
      • CSV Data Set Config (to read HTTP Request parameters from File 2)
      • User Parameters PreProcessor with username and password variables populated with __CSVRead function.

Something like:

CSV Demo

Hope this helps

like image 74
Dmitri T Avatar answered Apr 13 '23 18:04

Dmitri T