I recently performed a load test using visual studio and the experience was in some way smooth so I wanted to write it down for me to give a quick review when I need it. So first I will copy some theory from the MSDN to understand
the basic concepts and terminology related to Stress and load Test. To be a tester is a complete full job with many details.

Load tests consist of a series of Web performance tests or unit tests which operate under multiple simulated users over a period of time. Load tests are created with the New Load Test Wizard in Visual Studio 2010 and Visual Studio2012. This Load Test Wizard comes with the Ultimate versión of Visual Studio (Nothing else needed) which is the version I used.

 NOTE: If you are now running this test on you VS installation remember to enable the Internet Explorer Managed Add-On: Microsoft Web Test Recorder.

When you add Web performance tests to a load test, you simulate multiple users opening simultaneous connections to a server and making multiple HTTP requests. You can set properties on load tests that widely apply to the individual Web performance tests.

 

 

Load tests can be used in several different types of testing:

 

Type of Testing

Description

Smoke

How your application performs under light loads for short durations.

Stress

To determine if the application will run successfully for a sustained duration under heavy load.

Performance

To determine how responsive your application is.

Capacity Planning

How your application performs at various capacities.

 
 
About the think times concept:
 

Think times are used to simulate human behavior that causes people to wait between interactions with a Web site. Think times occur between requests in a Web performance test and between test iterations in a load test scenario. Using think times in a load test can be useful in creating more accurate load simulations. You can change whether think times are used or ignored in load tests. You change whether think times are used in your load tests in the Load Test Editor.

The think profile is a setting that applies to a scenario in a load test. The setting determines whether the think times that are saved in the individual Web performance tests are used during the load test. If you want to use think times in some Web performance tests but not in others, you must place them in different scenarios. For more information about scenarios, see Editing Load Test Scenarios Using the Load Test Editor.

Initially, you set whether you use think times in your load tests when you create the load test using the New Load Test Wizard. For more information, see How to: Create a Scenario Used to Model User Activities, Tests, Browsers and Networks Using the New Load Test Wizard.

The Think Profile options are described in the following list:

Off

Think times are ignored. Use this setting when you want to generate maximum load to heavily stress your Web server. Do not use it when you are trying to create more realistic user interactions with a Web server.

On

Think times are used exactly as they were recorded in the Web performance test. Simulates multiple users running the Web performance tests exactly as recorded. Because a load test simulates multiple users, using the same think time could create an unnatural load pattern of synchronized virtual users.

Using think times in a load test can be useful in creating more accurate load simulations. You can choose whether think times are used or ignored in load tests. To indicate that the think times in the Web performance tests should be used, change the think profile. The think profile applies to an entire scenario. If you want to use think times in some Web performance tests but not in others, you must add them to different scenarios. For more information about scenarios, see Editing Load Test Scenarios Using the Load Test Editor.

 

For more information about the settings, see Editing Think Times to Simulate Web Site Human Interaction Delays in Load Tests Scenarios

 
About Load Pattern
 

Constant:   The constant load pattern is used to specify a user load that does not change during the load test. For example, when you run a smoke test on a Web application, you might want to set a light, constant load of 10 users.

Step:   The step load pattern is used to specify a user load that increases with time up to a defined maximum user load. For stepping loads, you specify the Initial User Count, Maximum User Count, Step Duration (seconds), and Step User Count.

For example, a Step load with an Initial User count of one, Maximum User Count of 100, Step Duration (seconds) of 10, and a Step User Count of 1 creates a user load pattern that: starts at 1, and increases by 1 every 10 seconds until it reaches 100 Users.

 
 
 
About Text Mix Model
 
The test mix model specifies the probability of a virtual user running a given test in a load test scenario. This lets you simulate load more realistically. Instead of having just one workflow through your applications, you can have several workflows, which is a closer approximation of how end-users interact with your applications
 

To specify test mix model in the New Load Test Wizard

  1. On the Test Mix Model page of the New Load Test Wizard, select the test mix model to use in your load test scenario. You can pick one of the following:

    • Based on the total number of tests   Determines which Web performance or unit test is run when a virtual user starts a test iteration. At the end of the load test, the number of times that a particular test was run matches the assigned test distribution. Use this test mix model when you are basing the test mix on transaction percentages in an IIS log or in production data.

    • Based on the number of virtual users  Determines the percentage of virtual users who will run a particular Web performance or unit test. At any point in the load test, the number of users who are running a particular test matches the assigned distribution. Use this test mix model when you are basing the test mix on the percentage of users who are running a particular test.

    • Based on user pace   Over the course of the load test, each Web performance test or unit test is run a specified number of times per users, per hour. Use this test mix model when you want virtual users to run test at a certain pace throughout the load test.

    • Based on sequential order   Each virtual user runs the Web performance or unit tests in the order that the tests are defined in the scenario. The virtual user continues cycling through the tests in this order until the load test is complete.

 
 
 
Performance Counter Sampling Interval Considerations

Choose a value for the Sample Rate property in the load test run settings based on the length of your load test. A smaller sample rate, such as the default value of five seconds, requires more space in the load test results database. For longer load tests, increasing the sample rate reduces the amount of data that you collect. For more information, see How to: Specify the Sample Rate for a Load Test Run Setting.

Here are some guidelines for sample rates:

Load Test Duration

Recommended Sample Rate

< 1 Hour

5 seconds

1 - 8 Hours

15 seconds

8 - 24 Hours

30 seconds

> 24 Hours

60 seconds

 
This is what I did
 
1. Create a Web Performance Test
 
 
2. Navigate the web site in order to record a web test case (Web Test Recorded add on from IE must be enabled)
 
 
3.
 
 
4.
 
 
5.
 
 
6. 
 
 
 
7. It is needed to create a DataBase to store the results of the test, for this task you will need SQLServer (Express or not) and this SQLscript , located in your disk loadtestresultsrepository.sql
Check this link for details about how to Create a Load Test Results Repository Using SQL
 
 
8.
 
 
9.