0
votes

I am trying to perform load testing on NodeJS application, the application allows single login session for an user.

But, when i tried to perform load testing with 8 concurrent users (using the same credentials) it was working.

So, i tried to create 10 user IDs and added to the CSV file and configured "CSV Data Set Config" and "HTTP Cookie Manager" and set the "Number of Threads" to 80.

When I run the test plan, the credentials are not passed to each sessions equally. for example, userID1 is passed 3 times and userID2 is passed 7 times.

Can you clarify the reason for this behaviour and how to run the threads with each credentials (8 sessions for every credentials) from csv file ?

3
What Sharing mode are you using for the CSV config?Kris
"All Threads" sharing mode and i have got only one Thread Group in the test planSriram
Give a ramp-up period and try. May be 1 s?Kris
Thanks a lot. It works fine. Any idea on how 8 concurrent sessions worked for application which allows single session from UI ?Sriram
I added this as answer, so you can accept it.Kris

3 Answers

1
votes

Make sure you have set the options for CSV Data Set Config as All Threads for Sharing mode and provide a minimum ramp-up period (say 1 second) so that each thread reads the CSV lines properly without clashes.

For the question why it worked 8 concurrent sessions , where you allow only single session from UI - My guess is you used the same credentials for all 8 users - so server might have considered it to be 8 parallel requests from the same user. It depends on how session is maintained. For eg., if it was with a session-cookie , then If you had 8 different cookies it might have failed. But this is only a guess, as I don't know how its done in your app.

0
votes

JMeter acts as follows:

  1. All threads are started within the bounds of the ramp-up period which you define in the Thread Group
  2. Each thread starts executing Samplers upside down (or according to the Logic Controllers) as fast as it can
  3. JMeter waits for previous request to finish before starting next Sampler
  4. When the thread doesn't have any more Samplers to execute and loops to iterate - it's being shut down

If you observe the situation when this or that logic was used more than another, most probably the response time for the login was less.

You might want to check the size of the response as for successful requests it should be more or less the same and it might be the situation when the server returns HTTP Status code 200 but response body contains errors, to wit some logins may fail silently, if this is the case it makes sense to add a Response Assertion to add some extra checks, i.e. presence of "Welcome" text or "Logout" link or absence of "error" text or whatever.

-1
votes

What i could understand is you are trying to achieve 8 session each user.in order to do that you have to make 10 concurrent threads and 8 iterations that is how you will achieve 8 session for every credentials. But of your requirement is to run 80 concurrent users then try to make 80 users and run the test.