Testing Application Performance and Stress

This topic applies to:

Visual Studio Ultimate

Visual Studio Premium

Visual Studio Professional 

Visual Studio Express

Topic applies Topic does not apply Topic does not apply Topic does not apply

To determine how well your software responds to various levels of usage, you conduct load tests. A load test models the expected usage of a software program by simulating multiple users who access the program at the same time.

Visual Studio Ultimate lets you use up to 250 virtual users on a local load test run. If your load testing requires more virtual users, or you want to use remote machines, you must purchase Visual Studio Load Test Virtual User Pack 2010. You can purchase Visual Studio Load Test Virtual User Pack 2010 where you purchased Visual Studio Ultimate. For more information, see Managing Your Virtual User Licenses for Load Testing with a Test Controller and Configuring Test Controllers and Test Agents for Load Testing.

If yours is a high-usage model, for example, thousands of users visiting a Web site at the same time, you will need multiple computers to generate enough load. To achieve this, you can set up a group of computers for generating heavy simulated test loads. This group of computers consists of one or more test controllers and one or more test agents. A test agent runs tests and can generate simulated load. The test controller coordinates the test agents and collects the test results, and must be configured using one or more Visual Studio Load Test Virtual User Pack 2010. For more information about how to set up test controllers and test agents, see Distributing Load Tests Across Multiple Test Machines Using Test Controllers and Test Agents, Setting Up Test Machines to Run Tests or Collect Data and Installing and Configuring Visual Studio Agents and Test and Build Controllers.


You will also need to purchase Visual Studio Load Test Virtual User Pack 2010 licenses for the number of virtual users that you require for each test controller.

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.


Load tests can also include automated coded UI tests. Coded UI tests should be included only under specific circumstances. For more information, see Using Coded UI Tests in Load Tests.

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.

Use unit tests in a load test to exercise a server through an API. Typically, this is for servers that are accessed through thick clients or other server services rather than a browser. One example is an application with a Winforms or WPF front end, using WCF to communicate to the server. In this case, you develop unit tests that call WCF. Another example is a different server that calls the server through Web services. Additionally, it is possible that a two-tier client makes calls directly to SQL. In this case, you can develop unit tests to call SQL directly. For more information about unit tests, see Verifying Code by Using Unit Tests.

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

Type of Testing



How your application performs under light loads for short durations.


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


To determine how responsive your application is.

Capacity Planning

How your application performs at various capacities.

To change the load test properties, use the Load Test Editor. The properties allow you to run Web performance tests with different user profiles, browser targets, and load patterns. Test results are stored in SQL-based Load Test Results Repository. For more information, see Managing Load Test Results in the Load Test Results Repository.

You view both running load tests and completed load tests in the Load Test Analyzer. For more information, see Analyzing Load Test Runs.

Viewing a running test in the Load Test Analyzer

Running load test graphs view


Use the following topics to learn how to set up and use test controllers and test agents:

Key Tasks

Associated Topics

Getting started with load and Web performance tests: You can perform the actions in the Web and load test walkthroughs to become familiar with how to create, edit, run and view the results of load and Web performance tests.

Creating performance and stress tests: You can create load tests to measure your performance and stress using Microsoft Visual Studio Ultimate.

Setting up how to run your load tests: You can setup how to run your load tests to check that they are working correctly. You can use a group of computers to generate simulated load for testing, and to run tests remotely and concurrently on several computers. You can also configure the Run settings for your load test. Run settings are a set of properties that influence the way a load test runs. Run settings are organized by categories in the Properties window.

Running load tests: You can run your load test and view the results as the tests run.

Analyzing load test runs: You can analyze the results of a load tests and locate bottlenecks, identify errors, and measure improvements in your application.

Viewing Web Performance Test Results: You can view the results of your Web performance tests by using the Web Performance Test Results Viewer.

Manage your load test results: You can manage load test results from the Load Test Editor by using the Open and Manage Load Test Results dialog box. You can open, import, export, and remove load test results.

When you run your load tests, any information gathered during a load test run can be stored in the Load Test Results Repository, which is an SQL database. The Load Test Results Repository contains performance counter data and any information about recorded errors.

Reporting on load test analysis trends: You can use your load test results to create Microsoft Excel reports to help determine trends and performance levels.

Developing custom load and Web performance plug-ins: You can write custom load and Web performance plug-ins using the load test API and the Web performance test API.

Troubleshooting load test issues: If you have issues with your load tests, you might have to troubleshoot the problem.


Load test files and load test results contain potentially sensitive information that could be used to build an attack against your computer or your network. Load tests and load test results contain computer names and connection strings. You should be aware of this when you share tests or test results with others.

External Resources


link to videoChannel 9: New Web Test Debugging Features in Visual Studio Team System 2010

link to videoVisual Studio Developer Center: How Do I: Use Network Emulation in Load Tests

link to videoVisual Studio Developer Center: How Do I: Use ASP.NET Profiler in Load Tests

link to videoVisual Studio Developer Center: How Do I: Create a Data-Bound Web Test?

link to videoVisual Studio Developer Center: How Do I: Add Conditions to Web Tests to Determine If Web Pages are Returning What You Expect?

link to videoVisual Studio Developer Center: How Do I: Use .NET Code to Customize Coded Web Tests?

link to videoVisual Studio Developer Center: Set Up Fiddler’s Reverse Proxy to Create a VSTS 2008 Web Test?


Visual Studio Web Performance and Load Testing


Ed Glas’s Blog

Sean Lumley’s Blog

Bill Barnett’s Blog

Howie Hilliker’s Blog

Quick Reference Guide

Visual Studio Performance Testing Quick Reference Guide

See Also


Testing the Application

Verifying Code by Using Unit Tests

Load Test Analyzer Overview

Other Resources

Creating Automated Tests