Testing Performance and Stress Using Visual Studio Web Performance and Load Tests

To determine how well your software program 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 an unlimited number of virtual users on a local and remote load test run. The virtual users that are used in load tests use multiprocessor architecture. Multiprocessor architecture allows the machine on which the virtual users are installed to use more than one processor. In a load test, the load pattern properties specify how the simulated user load is adjusted during a load test. Visual Studio Ultimate provides three built-in load patterns: constant, step, and goal-based. You choose the load pattern and adjust the properties to appropriate levels for your load test goals. For more about load patterns, see Editing Load Patterns to Model Virtual User Activities.

If yours is a high-usage model, for example, thousands of users visiting a website 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. For more information about how to set up test controllers and test agents, see Distributing Load Test Runs Across Multiple Test Machines Using Test Controllers and Test Agents, Setting Up Test Machines to Run Tests or Collect Data and Installing and Configuring Test Agents and Test Controllers.


  • Visual Studio Ultimate


The virtual user limit for load testing has been removed. You no longer have to purchase virtual user licenses to increase the number of virtual users that you can simulate in a load test.

See Video: Load testing applications in Visual Studio.

Load tests consist of a series of Web performance tests or unit tests that 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 your application will run successfully for a sustained duration under heavy load.


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 Tests Results Using the Load Test Analyzer .

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 performance and stress using Microsoft Visual Studio Ultimate.

Setting up how to run your load tests: You can set up how to run your load tests to determine 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 while 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 a 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


Testing for Continuous Delivery with Visual Studio 2012 – Chapter 6: A Testing Toolbox


Load testing applications in Visual Studio

Introduction and Story Boarding for SharePoint Load Testing with Visual Studio 2012.1

How to use Visual Studio 2012.1 for SharePoint Application Load Testing

See Also


Testing the Application

Verifying Code by Using Unit Tests

Load Test Analyzer Overview

Other Resources

Creating Automated Tests Using Microsoft Test Manager