Web Performance and Load test in VS 2010 Ultimate, Part 2

 Part 2 : How to configure your visual studio environment to start web performance and Load test

In part 1 of this post series we go through an overview of the web performance and Load test, you can review part 1 by using the following Link:

(http://blogs.technet.com/b/meamcs/archive/2012/05/07/web-performance-and-load-test-in-vs-2010-ultimate-part1.aspx)

Prerequisite Configuration and Setup for using Load test:

· Create Load test DB (“LoadTest2010”) in your SQL Server, this database will host all the load test results, and you cannot run load test before connect your visual studio to this database.

· You will find the script of creating this database in the following path “C:Program FilesMicrosoft Visual Studio 10.0Common7IDE” with name “loadtestresultsrepository.sql”, the path depend on your installation path options, also you will find this file attached with my blog.

The following snapshot gives you the detail steps need to be done to configure load test DB with visual studio:

1. Run the scripts “loadtestresultsrepository.sql”, in the SQL Server Management studio

image

2. From visual studio click on the Test Menu, then click on Manage test controllers… sub-menu

image

3. In the Manage test controller’s window, we defined the controller name, when the default controller is your machine by default, and we also need to set the connection string to connect to load test DB, which created from the previous script.

image

4. Now we complete the configuration to start create new Web performance test:

a. create new Test Project with the three following steps

b. Create New Test Project, from Visual studio, click File à New à Project…

image

c. Add new item to Test Project, by right bottom on the project and choose Web Performance Test

image

d. Once you choose Web Performance Test, then automatic IE open with Web test Recorder Plug-in Appear to start record your scenario, when you complete your scenario then press stop, the visual studio start saving your recording into serial of requests to able to run this recording multiple times later or you can include this scenario in load test later on.

image

5. Now you can create new Load test:

a. Right clicks on the test project node, then Click add then Load Test…

image

b. Right clicks on the test project node, then Click add then Load Test… , Visual studio start New Load Test Wizard

image

1. Determine the Scenario Name, name of test load scenario, the second option on this page is to configure think times, which is a delay between each request, which can be used to approximate how long a user will pause to read, consider options, and enter data on a particular page. The think time profile panel enables you to turn these off or on.

image

2. Determine the load pattern, the next step is to define the load pattern for the scenario, you have two load pattern options: Constant and Step. A constant load enables you to define a number of users that will remain unchanged throughout the duration of the test. Use a constant load to analyze the performance of your application under a steady load of users. A step load defines a starting and maximum user count. You also assign step duration and a step user count.

image

3. Determine test mix Model, The test mix model determines the frequency at which tests within your load test will be selected from among other tests within your load test. The test mix model allows you several options for realistically modeling user load.

image

4. Determine Test Mix, which include no. of different scenarios and their distribution percentage.

image

5. Determine Network Mix, which give you the ability to specify the kinds of network connectivity you expect your users to have (such as LAN, 3G and Cable-DSL).

image

6. Determine browse Mix, which give you the ability to define the distribution of different browser types that you wish to distribute.

image

7. Determine Counter set, which give you the ability to add different computers with the counter set to each related computer, the counter set that can be used like (Application, ASP.NET, .NET APPLICATION, IIS and SQL).

A counter set is a group of related performance counters. All of the contained performance counters will be collected and recorded on the target machine when the load test is executed.

image

8. Determine Run Settings, the Final step is to specify the length of the load test, we have two options (Load test duration or Test Iteration),

                     Load test duration we determine two parameters (Warm-up duration and Run Duration)

                    Sample Rate determine how often performance counters will be collected and recorded. A higher frequency (lower number) will produce more detail.

                   Validation Level indicate which web performance test validation rules should be executed.

Finally click finish to complete the wizard and create Your new load test.

loadtestresultsrepository.sql