Dialogue Performance and load testing are both key to understanding how your application or service scales with real-world ...

Dialogue
Performance and load testing are both key to understanding how your application or service scales with real-world user load. You can gain performance and stress data using web performance and load tests which are included in Visual Studio Ultimate 2012. These tests help you isolate bottlenecks in your code and optimize performance. Let us walkthrough a simple scenario of creating and running a load test using Visual Studio Ultimate 2012.



Action
Create a new ‘Web performance and load test' project in New Project > C# > Test Projects

Dialogue
Let us start with creating a new "Web performance and load test" project.



Action
Start recording a webtest. Lauches IE with recording toolbar.

Dialogue
Next, let us record a simple web test that we'll use for this walkthrough.



Action
Create a web recording for a simple scenario. Go to www.microsoft.com, click on Products > Visual Studio, and click on Compare Products.

Dialogue
We are walking through a sample scenario here, and all the HTTP requests and responses are captured by the recorder.



Action
Stop the web test recording.

Dialogue
As you can see, our web performance test is created with this recording. Dynamic parameters are automatically detected. You can edit this script and add additional validation rules.



Action
Create a new load test with this web test. (Right click on project node and say Add New Item > Load Test). Choose all defaults.

Dialogue
Let us now create a new load test that will include the web performance test we just created. Here, you can simulate load that you expect your application to be subjected to under production. This load can include varying levels of virtual users, network types and browser types. You can run both web tests and unit tests as part of a load test. You can also configure which performance counters to collect from your system under test.



Action
Run the load test.

Dialogue
Let us now run the load test. This runs the web performance test with multiple concurrent virtual users. As the run is in progress, you can see the response time, errors, and other key metrics of your application with the configured load. You can also view counters from the system under test.



Action
Load test run completes. Go through the different tabs in result. Summary, graphs, tables.

Dialogue
Once the run is complete, you can analyze the results with summary, graphs of key metrics, and the tables view. This will let you analyze performance hotspots and failures as your application scales up. You can also export the results to Excel for custom reporting.



Dialogue
Visual Studio makes it really easy to create and run web performance and load tests, to test the performance and stress capacity of your application. With Visual Studio, you can generate a load of as many virtual users as you want. In order to scale the number of virtual users, you can run the load tests remotely on multiple test agents. So, go ahead and get started with load testing to improve the performance of your application.