Kajari, I would use nested loops. One Loop Controller for file2.csv (loop 500 tines) inside the Loop Controller for file1.csv (loop 100 times). Doing so, each user in file1.csv will go over 500 rows in file2.csv
Regards, Tien -----Original Message----- From: Jeff Ohrstrom [mailto:[email protected]] Sent: Monday, June 30, 2014 2:13 AM To: [email protected] Subject: Re: Using multiple CSV files and Multiple HTTP requests for one User in a Thread Group Kajari, The implementation of this is simple. For the first file (file1.csv) you simply need to override what Jmeter picks up out of the file with a JRS223 or BSF pre processor. That is, Jmeter divides out rows from csv files on a first come first serve basis. But you want to be sure that the Nth thread to have the Nth record from the file. To do this in the pre-processor element you can use the ${__ThreadNum} function and use some sort of BufferedFileReader class. The File Reader should read to line == ${__ThreadNum} extract those values from that line and do a vars.put(userIdVariable,extractedString); For files2.csv you just need to set the Sharing Mode property to 'Current Thread'. That means that every thread iterates through the entire 500 line file and uses all values. On Sun, 2014-06-29 at 17:19 +0530, Kajari Ghosh Dastidar wrote: > 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? > > Thanks! > Kajari --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
