Accessing Load Test Results
You can analyze your load test data to locate bottlenecks, identify errors, and measure improvements in your application. Before you can analyze your load test data, you must first access the load test results.
You can access load test results to complete the following tasks:
Monitor a load test while it is running.
Analyze a load test after it has completed.
View results from a previous load test.
These tasks can be completed whether you run your load test from Microsoft Visual Studio 2005 Team Edition for Software Testers or from the command line, and whether you run your load test on a single computer or on a remote rig. This document discusses different ways to access your load test results.
Differences between Monitoring and Analyzing Load Tests
While a load test is running, a smaller set of the performance counter data is maintained in memory. You can monitor this set of data while your load test is running. After a load test has completed, you can load the full set of data from the database. There are some differences in what data you can see while a load test is running and what data you can see after a load test has completed. There are also some differences in the functionality of the tools available to analyze the data.
For more information, see Analyzing Load Test Results.
The Load Test Analyzer
When you analyze your load test data, you use the load test analyzer window. You can have multiple load test analyzer windows open at the same time, to compare different load test runs.
The load test analyzer appears as a tabbed document, but can also be docked or allowed 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 the test was started. For example, LoadTest1 [12:40 PM].
Accessing Load Test Results
When you run a load test from a load test editor, the load test results open automatically. When you run a load test from the Test View window, the Test Manager window, or from the command line, you must access the load test results manually. For more information about the different ways to run a load test, see How to: Run a Load Test.
Generally, you access your load test results manually from the Test Results window. The drop-down list on the Test Results toolbar lists the load tests that are currently running, or that have recently completed. However, sometimes the test runs you want are unavailable in the Test Results drop-down list. In those cases, you can use the Test Runs window to populate the Test Results drop-down list with the test runs that you want. You can add previous and remote load test runs to the drop-down list by using the techniques described later in this document.
Accessing Results from Previous or Remote Load Test Runs
Load test run data is saved in the load test results store. For more information, see Load Test Results Stores.
Information about load test runs is saved as files that have an extension of trx. You can access load test data from the results store by opening the trx files. By default, the trx files are saved in the folder <Your Path>\<Your Test Project Name>\TestResults, and are named <User Name>_<Computer Name> YYYY-MM-DD HH-MM-SS.trx.
Accessing Results for the Current Load Test in the Current Visual Studio Session
If you are running a load test in Visual Studio, you can access the results from all the runs in the current Visual Studio session in the Test Results window.
Use the following procedure in this case:
- A load test run from an open solution, in the current Visual Studio session.
To access results for the current load test in the current Visual Studio session
On the Test menu, point to Windows and then click Test Results.
The Test Results window is displayed.
In the drop-down list on the Test Results window toolbar, select the load test run whose results you want to see.
The summary of the status of the load test is displayed in the grid.
Select the load test in the grid.
Right-click and choose View Test Result Details
- or -
Double-click the load test you selected.
A load test analyzer window opens and the load test results are displayed.
Accessing Results for the Current Load Test in Previous Visual Studio Sessions
If you are running a load test in Visual Studio, you can access the results from the runs in previous Visual Studio sessions in the Test Runs window.
Use the following procedure in this case:
- A load test run from an open solution, in a previous Visual Studio session.
To access results for the current load test in previous Visual Studio sessions
On the Test menu, point to Windows and then click Test Runs.
The Test Runs window is displayed.
In the Select drop-down list, click Local Results TestResults.
The .trx files in the TestResults folder of the solution are loaded into the Test Runs window in a list. By default, the results will have the status Disconnected.
Select a test run in the list and click Connect on the Test Runs toolbar.
The pass and fail status information for that load test run is displayed in the list.
Right-click the test run in the list and click View Results.
Note
Instead of right-clicking, you can also open the Test Results window manually. To open the window manually, on the Test menu, point to Windows and then click Test Results.
The Test Results window opens.
Important
The test results that are displayed in the Test Results window at this point might not be the results that you had selected in the Test Runs window yet.
In the drop-down list on the Test Results window toolbar, select the load test run whose results you want to see.
The summary of the status of the load test is displayed in the grid.
Select the load test in the grid.
Right-click and choose View Test Result Details
- or -
Double-click the load test you selected.
A load test analyzer window opens and the load test results are displayed.
Accessing Results from Load Tests Run Locally
To access the results from load tests run on the current computer, you use the Test Runs window. The load test project itself does not have to be open.
Use the following procedure in these cases:
A load test run on the local computer that is not part of a solution open in Visual Studio.
A load test run on the local computer that is part of an open solution, but that was exported to a location other than the TestResults folder.
To access results from load tests run locally
On the Test menu, point to Windows and then click Test Runs.
The Test Runs window is displayed.
In the Select drop-down list, click Local or connect to remote.
The Connect to Controller or Local Results dialog box is displayed.
Click Select results from local runs, and then click the Browse button.
The Select results from local runs dialog box is displayed.
Navigate to a folder that contains .trx test result files, and click Open.
The .trx files are loaded into the Test Runs window in a list. By default, the results will have the status Disconnected.
Select a test run in the list and click Connect on the Test Runs toolbar.
The pass and fail status information for that load test run is displayed in the list.
Right-click the test run in the list and then click View Results.
Note
Instead of right-clicking, you can also open the Test Results window manually. To open the window manually, on the Test menu, point to Windows and then click Test Results.
The Test Results window opens.
Important
The test results that are displayed in the Test Results window at this point are not the results that you had selected in the Test Runs window yet.
In the drop-down list on the Test Results window toolbar, select the load test run whose results you want to see.
The summary of the status of the load test is displayed in the grid.
Select the load test in the grid.
Right-click and choose View Test Result Details
- or -
Double-click the load test you selected.
A load test analyzer window opens and the load test results are displayed.
Accessing Results from Load Tests Run Remotely
To access the results from load tests run remotely, for example on a rig, you use the Test Runs window. The load test project itself does not have to be open.
Use the following procedure in this case:
- A load test run on a rig.
To access results from load tests run remotely
On the Test menu, point to Windows and then click Test Runs.
The Test Runs window is displayed.
In the Select drop-down list, click Local or connect to remote.
The Connect to Controller or Local Results dialog box is displayed.
Click Enter or select a controller machine name to connect to remote runs.
Type the name of a controller computer, or use the drop-down list to select it, and then click OK.
The .trx files are loaded into the Test Runs window in a list. By default, the results will have the status Disconnected.
Select a test run in the list and click Connect on the Test Runs toolbar.
The pass and fail status information for that load test run is displayed in the list.
Right-click the test run in the list and then click View Results.
Note
Instead of right-clicking, you can also open the Test Results window manually. To open the window manually, on the Test menu, point to Windows and then click Test Results.
The Test Results window opens.
Important
The test results that are displayed in the Test Results window at this point are not the results that you had selected in the Test Runs window yet.
In the drop-down list on the Test Results window toolbar, select the load test run whose results you want to see.
The summary of the status of the load test is displayed in the grid.
Select the load test in the grid.
Right-click and choose View Test Result Details
- or -
Double-click the load test you selected.
A load test analyzer window opens and the load test results are displayed.
Exporting and Importing Test Result
You can export and import test results manually.
Use the following procedures in these cases:
You want to save results to or access results from locations other than the default location.
You want to share results with someone else by exporting the trx file, sending it to them, and having them import it.
To export test results
On the Test menu, point to Windows and then click Test Results.
The Test Results window is displayed.
On the Test Results window toolbar, click Export Test Run Results.
The Export Run dialog box is displayed.
Navigate to the location that you want to save your results, and click Save.
The .trx file and a folder with supporting files are saved in the location that you specified.
To import test results
On the Test menu, point to Windows and then click Test Results.
The Test Results window is displayed.
On the Test Results window toolbar, click Import Test Results.
The Import Results dialog box is displayed.
Navigate to a .trx file, and click Open.
The summary of the status of the load test is displayed in the grid.
Select the load test in the grid.
Right-click and choose View Test Result Details
- or -
Double-click the load test selected.
A load test analyzer window opens and the load test results are displayed.
See Also
Tasks
How to: View a Test Run on a Rig