Load Test Steps using Visual Studio 2010 Ultimate
Blog

Load Test Steps using Visual Studio 2010 Ultimate

By Aniruddha Mukherjee  |  Published on April 22, 2014

Netwoven Blog

In this blog I will describe how we can configure Load testing using the Visual studio 2010 Ultimate edition.

Steps

Step 1: Identify or create a web application, for which you want to perform a Load test. Here I have created a simple web application, with Login and Logout controls.

Load Test Steps using Visual Studio 2010 Ultimate
Load Test Steps using Visual Studio 2010 Ultimate

Step 2: I created a Test project with name LoadTestProject. Now in the first place i will add a Test file to this project. When you click “Add New”, VS will present you with lot of options. Here we need to select a “Web Performance Test” for this scenario. I named it as “SingleUserPerfTest”.

Load Test Steps using Visual Studio 2010 Ultimate

Step 3: Once you click Add, you will be presented with a explorer window with recording infrastructure. All you need to do is, click the “Start Record” button and perform what are all actions/browse through pages you want to test.

Load Test Steps using Visual Studio 2010 Ultimate

Step 4: Once you are done with all the stuff, click on Stop button. Visual studio will convert all the recorded steps into code, embedded into .webtest file.

Load Test Steps using Visual Studio 2010 Ultimate

You can expand the nodes and see what all actions are recorded, and what are the requests/responses generated during our webtest.

Load Test Steps using Visual Studio 2010 Ultimate

You can run this test by clicking the Left-Top button, but this will be equal to our unit test. We haven’t tested the response of application under load.

Load Test Steps using Visual Studio 2010 Ultimate

Step 5: Now Add new test file to project. This time select a Load Test file from the menu. I named it as “SampleLoadTest”.

Once you click Add button, you will be presented with a wizard, using which you will configure the Load test.

Load Test Steps using Visual Studio 2010 Ultimate

Step 6: As a first step, we will name the scenario, and will setup think time for the profiles. In the real time scenario, the users will take 1 to 3 seconds between performing one action after another, either due to reading webpage or thinking. This delay will be created while load test using “Think Time” specified below.

Step 7: In next step you will be selecting the load pattern. Whether you want to apply a constant load or increase the load in a cumulative way. These variables can be configured here.

Load Test Steps using Visual Studio 2010 Ultimate

Step 8: Now, you have to select the Individual webtest(s) you have created earlier, which need to be considered under this load test.

Load Test Steps using Visual Studio 2010 Ultimate

Step 9: Here you can select either for how much time you want to run the test, or how many iterations of test you want to perform.

Load Test Steps using Visual Studio 2010 Ultimate

Step 10: Once you click “Finish” button, all the configuration will be embedded in to the Load test file. You can click on each specific step/ configuration, and can modify the values in property window.

Load Test Steps using Visual Studio 2010 Ultimate

Step 11: We are all set now. Click the “Run Test” button on Top-Left corner and see what happens.

Load Test Steps using Visual Studio 2010 Ultimate

All the key factors will be presented graphically while performing the load test. We can figure-out different factors and their variation patterns under load conditions.

Load Test Steps using Visual Studio 2010 Ultimate

Finally after completion of test, a test result document will be created using which you can analyze what are the stress factors where we need the performance tuning.

These test results can also be stored into database by configuring the controller connection string. For further details on how to store test results Using SQL please follow the MSDN link below.

http://msdn.microsoft.com/en-us/library/ms182600.aspx

You can also download Sample Codes from: Sample Load Test Project

Leave a comment

Your email address will not be published. Required fields are marked *

Unravel The Complex
Stay Connected

Subscribe and receive the latest insights

Netwoven Inc. - Microsoft Solutions Partner

Get involved by tagging Netwoven experiences using our official hashtag #UnravelTheComplex