How to: Run a Load Test

After you have created the load test by using New Load Test Wizard, and edited its settings and configuration options, you can run your load test to verify that it is working correctly and view how your application responds to the load simulation. For more information, see Creating and Editing Load Tests.


  • Visual Studio Ultimate


Before you run a load test, make sure that all the Web performance and unit tests that are contained in the load test will pass when they are run by themselves. You can verify the tests by running them from either the Web Performance Test Editor or Test Explorer. For data-bound Web performance tests, run through all of the data values.

While a test is running, a condensed set of the performance counter data that can be monitored in the Load Test Analyzer is maintained in memory. To prevent the resulting memory requirements from growing unbounded, a maximum of 200 samples for each performance counter is maintained. This includes 100 evenly spaced samples that span the run's current elapsed time, and the most recent 100 samples. The result that is accumulated during a run is called an in-progress load test result.

In addition to the condensed set of performance counter data, the Load Test Analyzer has the following functionality available to analyze the in-progress load test result data that is unique while a load test is running:

  • A progress indicator specifies the time that remains.

  • A button on the Load Test Analyzer toolbar is available to stop the load test.

  • You can specify either collapsing or scrolling graphing modes on the Load Test Analyzer toolbar:

    • Collapsing is the default graph mode in the Load Test Analyzer during a running load test. A collapsing graph is used for load test while it is running to reduce the amount of data that must be maintained in memory, while still showing the trend for a performance counter over the full run duration.

    • Scrolling graph mode is available when you are viewing the result of a load test while it is running. A scrolling graph is an optional view which shows the most recent data points. Use a scrolling graph to view only the most recent 100 data intervals in the test.

  • An Overview pane which displays the configuration, requests and test cases information for the running load test.

For more information, seeĀ Analyzing Load Tests Results Using the Load Test Analyzer .


When you use Team Foundation Build to run a load test that was created by using the default settings, the default counters do not appear automatically in the test results. To view the counters, drag the required counters onto the load test results graph. 

Load tests are run from the either the Load Test Editor, or the LOAD TEST menu as show in the illustration below.

Run load tests

To run a load test

  1. From the Web performance and load test project, open a load test.

  2. With a load test open in the Load Test Editor, choose the Run button on the toolbar.


    From the LOAD TEST menu, choose Run or Debug and then chose either Selected Test or All Tests in Solution.


    You can select one or more load tests in your solution and choose Selected Test.

    For more information, seeĀ How to: Run Automated Tests from Microsoft Visual Studio.

  3. You can use the Load Test Analyzer to start analyzing your load test data while it is running.

  4. Use the Graph Options drop-down on the Load Test Analyzer toolbar to switch between collapsing and scrolling modes while the load test is running.

  5. You can add a comment while the load test is running that will be stored permanently with the load test result.

    For more information, see How to: Add a Comment to a Running Load Test Using the Load Test Analyzer.

    After a load test has completed, The Load Test Analyzer appears as a new tabbed document with the load test summary displayed. The Load Test Analyzer can also be docked or set to float by using the usual Visual Studio window manipulation techniques. The title of the window is the name of your load test and the time that the test was started, for example, LoadTest2 [1:15 PM].

    For more information, see Load Test Analyzer Overview.

    The load test result for the completed load test contains performance counter samples and error information. This information was collected periodically from the computers-under-test. A large number of performance counter samples can be collected over the course of a load test run. The amount of performance data that is collected depends on the length of the test run, the sampling interval, the number of computers under test, the number of counters being collected, the data collectors that are configured, and the logging levels. For a large load test, the amount of performance data that is collected can easily be several gigabytes. For more information, see Distributing Load Test Runs Across Multiple Test Machines Using Test Controllers and Test Agents and Considerations for Load Testing.

See Also


How to: Run a Load Test Using Test Controllers and Test Agents Specified in a Test Setting

How to: Run a Load Test from the Command Line

How to: Configure and Run Scheduled Tests After Building Your Application


Running Load Tests

Load Test Analyzer Overview

Analyzing Load Test Results and Errors in the Tables View of the Load Test Analyzer