1

I am new to Jmeter and doing a POC to do a load test on a web application.

What I am trying to do: I have a total of 4 user logins(surgeons). Each Login is associated with 'n' number of patients. I've created 2 CSV files

  1. one with the user login and password for surgeons
  2. another CSV file that contains the PatientName, PatientID and the Surgeon associated with that Patient like below.

PatientName,PatientId,loginName Pa1,PID1,user1 Pa2,PID2,user1 Pa3,PID3,user1 Pa4,PID4,user1 Pa5,PID5,user2 Pa6,PID6,user2 Pa7,PID7,user3 Pa8,PID8,user4

My Scenario:

Login as User. Navigate to Each Patient Dashboard as per their associations. log out of the application. My Testplan

Thread Group (4 users, Ramp up time as 1 sec, 1 loop) -csv1(with username, password ) -Login Page and Navigate to the Main page - RunTime Controller (To sustain the load of a set amount of time) -- While Loop(to loop between the patient dashboard of the surgeon/user logged in) ---CSV2 (the data as shown above) ----Navigate to Dashboard ----Navigate to Main -Log out of the Application

What I want to achieve:

I want to use the single thread group and run it concurrently for all the 4 users. In this process, once the user login, the user should only those patient data from the CSV which are associated. For Ex: When the Thread1 is running with User1 login, he should only able to loop through Pa1, Pa2, Pa3, Pa4 users When the thread2 is running with User2 login, user should only read the Pa5, Pa6 data.

Like this, each user login should only pick those users as per their associations mentioned above. Is there any way, I can use this single CSV2 file and achieve this task? so that I don't have to create n number of the thread of n numbers of logins with n number CSV files each containing the data specific to the user login.

I did try to use the _CSVread function but that will make me to create multiple files(I currently have 500 CSV files) which is not a great idea. Expecting to find a solution to have all the data in one CSV and read it based on the Column value.

Tara
  • 11
  • 2

1 Answers1

0

Reading data from CSV file based on particular column value is not supported in JMeter, you can consider the following options:

  1. Create separate CSV files for each surgeon and pick up the relevant file based on currently logged surgeon id/name/whatever using __CSVRead() function.
  2. Use If Controller to choose to this or that execution branch based on the surgeon name
  3. Use Switch Controller to choose this or that execution branch based on the surgeon name
Dmitri T
  • 159,985
  • 5
  • 83
  • 133