Figure 5. Test mix model

Load test allow to understand how many users at once your server and application can process at once. Visual studio 2013 allows you to imitate user action and as robots, so and with human-like behavior.

Load test executes web test a lot of times. So before executing Load test, you should create a web test (link to previous post). It's written here: https://markimarta.com/c/create-web-test-in-visual-studio-2013/

To add a load test to your project, switch to Solution explorer and right click on your web test project (WebAndLoadTestProject1) and choose Add > Load Test (Figure 1).

Figure 1. Adding a load test

Figure 1. Adding a load test

 

Figure 2. Welcome screen on creating a load test

Figure 2. Welcome screen on creating a load test

 

In Scenario step add "Think time" parameter. It means what time user thinks between steps. I use 5 seconds (Figure 3).

Figure 3. Set Think time parameter

Figure 3. Set Think time parameter

 

In the step "Load pattern" (Figure 4) you choose how many users will request your application. I don't use "Constant load" because it's just not interesting. I use "Step Load" with parameters according to my expectations and see the load grows dynamically.

Figure 4. Load pattern

Figure 4. Load pattern

 

In "Test mix model" step I choose "Based on user pace" (Figure 5).

Figure 5. Test mix model

Figure 5. Test mix model

In step "Test mix" you should add Web tests from your project (Figure 6). To add web test click on "Add…" button and add tests. Set how many users per hour will execute the test.

Figure 6. Step Test mix - Add web tests

Figure 6. Step Test mix - Add web tests

In step Network mix I don’t change anything and just press Next.

Figure 7. Network mix

Figure 7. Network mix

 

In step Browser mix choose which browsers will test your application. Depending on the browser, rendering time may vary.

Figure 8. Browser mix

Figure 8. Browser mix

In step Counter steps you can choose computers on which counters of performance monitor will be turned on. Load test must be executed from another machine in the same Local area. In other case skip this step (Figure 9).

Figure 9. Counter sets

Figure 9. Counter sets

In step Run settings choose the length of your load (Figure 10). It may be as the time, so and quantity of iterations. Also you can set warm up time to exclude time loss on the first request to a "cold" application.

Figure 10. Run settings

Figure 10. Run settings

 

Press Finish button. The load test is in the Figure 11.

Figure 11. Load test

Figure 11. Load test

To run Load test press the button "Run load test" (Figure 12)

Figure 12. Run load test

Figure 12. Run load test

 

Then you can see color graphs and enjoy the process.

 

Figure 13. Load test is working

Figure 13. Load test is working

When load test is over, you will see the results.

Figure 14.Load test summary

Figure 14.Load test summary