Multiple users with unique session IDs in jmeter

1k Views Asked by At

We are trying to perform load testing with multiple users having unique session IDs, users should be unique. We are trying to do the following steps

  1. Login
  2. Search by ID
  3. Submit that request.
  4. Logout.

We are trying to do something like this in JMeter

Test Plan
  Thread Group
  HTTP Header Manager
  HTTP Request Default
  Http Cookie Manager
  CSV Data Set (Login User Names)
  Transction Controller
    CSV Data Set (Containing ID${__ThreadNum} as filename)
    HTTP Sampler (Login)
    Loop controller
      HTTP Sampler (Search by ID)
      HTTP Sampler ( Submit)
  Http Sampler (Logout)

The problem is that it works fine with the user by which the recording/scripting is done, and does not produce the intended results with other users. e.g. If I have recorded the script with User1, then it will search and submit from user1 only. For other users e.g. User2 and User3 it will product empty/No results in the search and submit request's response.

If I record it from User2 than it will start working for user2 and will not work for user1

Any help please. I think there is some problem related to session or cookies. Kindly can anyone please let me know what is the best practice to use Cookie Manager? And any suggestions for this problem

1

There are 1 best solutions below

0
On

Most probably you are missing some correlation work where some dynamic ID(s) must be extracted from Response in Body or Header to be injected in next request.

Use View Results Tree to see what differs between the recording and the replay, search for IDs in cookies, headers, parameters.