1

For a testing scenario for a web app, I'm trying to test a case where 500 users are logged in on the web app, but 50 concurrent users actually navigate through the app. I'm not entirely clear on how to do this.

What I figured was, that if you have a constant pattern of 500 users and 50 test iterations, you would achieve this effect, but from what I'm reading here that isn't the case.

Is this scenario achievable in a single Visual Studio load test?

Aage
  • 5,932
  • 2
  • 32
  • 57
  • I use fiddler web proxy to test a load. login with one user, peform your actions, select the requests and replay them. Copy both sets, replay, copy 4 sets replay, etc until you have enough requests to simulate your 50 users. –  Jan 22 '14 at 07:16

1 Answers1

2

Create two Scenarios within the Load Test.

In Scenario1, set a load of 50 users and other settings as normal. This scenario should be assigned web tests that actually do stuff, navigating through the app. These will be your "active" users.

In Scenario2, set a load of 450 users, set Think Profile on, and set Think Time Between Test Iterations to some value that is larger than the duration of the load test. This scenario should be assigned a single web test that just logs in. These will be your logged-in but inactive users.

If the initial logging in is too heavy a load for your server, space it out by using a Step load pattern on Scenario2 possibly combined with Delay Start Time on Scenario1 (as suggested by AdrianHHH).

When the test starts, all 500 users will log in, but then only the 50 active users will be actually putting any load on the web app.

FYI the Test Iterations setting (if active) only determines when the load test will end: after the given number of test iterations, in total. So you are correct, it won't help you.

agentnega
  • 3,478
  • 1
  • 25
  • 31
  • 1
    Having 500 users doing logins at the same time may overload the system. Suggest using the **Load step pattern** options to log the 450 in slowly, perhaps over a few minutes. Delay the start of the other scenario until after the 450 logins complete. Might also login the 50 users slowly. – AdrianHHH Feb 12 '14 at 05:49
  • @AdrianHHH But how would you know the 450 logins have completed? And if they're logged in, wouldn't this test finalize (and log out all users)? – Aage Feb 12 '14 at 11:16
  • 1
    @bump, with the Step load pattern you can do the math to figure out how long it will take for all the logins to _begin_, at least, which should be good enough. `wouldn't this test finalize (and log out all users)?` -- no, the load test will continue for its full duration. It doesn't care that the 450 users are idle. – agentnega Feb 12 '14 at 18:07