2

I have been working on performance testing for a while. I want to ask if there is any difference between running the test for 500 virtual users using the same username and password or should we be using different user for each virtual user. If the test was executed with the same user, will the user data be cached on client or server sides and the results won't be accurate?

Thanks!

Robert
  • 69
  • 1
  • 5
  • Those both are great questions to the developers of the application you are testing. The answer is not universal, and depends very much on implementation of the app. – timbre timbre Apr 08 '16 at 21:19

3 Answers3

1

It is all about How realistic is your test scripts.If 500 virtual users login with different credentials of username and password, then it will mimic the real life scenario.Login with same credentials will not.

You should use "HTTP Cookie Manager" and "HTTP Cache Manager" in your Test Plan.Using "HTTP Cookie Manager" enabling "Clear cookie each iteration" and "HTTP Cache Manager" enabling "Clear cache each iteration" will at least bring some luck for 500 VUsers using same ID and Password. In this case, every user will be assigned with different session ID and the session cookie and cache will be cleared before next login using "Same Username & Password".So though ID and Password are the same but previous cookie and cache are cleared before new login. So the result will be more accurate and realistic.It basically depends on your test script design.

Though it is always appreciated and recommended to use different credentials despite using "HTTP Cookie Manager" and "HTTP Cache Manager" in your Test Plan.

Adnan
  • 2,931
  • 3
  • 23
  • 35
0

IMHO, the load testing should simulate as closely as possible the real user behaviour, BUT the final answer is really dependent on your application, on the budget you have to do the test, and on the perception you have about how critical is scanning the user DB.

In one case, I had to create a number of user which was 10x the maximum number of virtual user I actually used in each test.

sbos61
  • 554
  • 2
  • 9
0

I think that simulating users connecting with the same account will most likely always hit the cache or the same components.

For example a cart on a web store: if you rely on the same user account, you will have concurrency issues when adding products to the cart. More information in this blog post: What makes a realistic load test?

geraldpereira
  • 223
  • 3
  • 11
  • Not only the above, but you are likely to create unnatural locking conditions across multiple sessions accessing the same data records which would not appear in production where each user has a different recordset This type of test would fail an audit where the attempt is to reproduce the load of a natural user population – James Pulley Apr 11 '16 at 02:54