How to: Import Test Results

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The test engine automatically stores all test results to a folder on the hard disk of your computer. In addition to this automatic mechanism, you can also explicitly store test results, as described in How to: Export Test Results.

You can import test results that were saved either way by using the following procedures. Importing test results displays them in the Test Results window so that you can examine and work with the results.

To import test results, you must know where to find the file that contains the results that you want. The file location might vary, according to how it was created. Test results files have the .trx extension.

  • If you explicitly exported test results, locate the folder that you specified. If you accepted the default folder for the export operation, that folder is your My Documents folder, which is typically found at the following location:

    <drive>:\Documents and Settings\<user name>\My Documents

  • If you want to import a test results file that was saved automatically by the Team System testing tools, locate the test results folder for your solution. This folder is named TestResults, and it is a child folder of your solution folder.

    By default, test results files are named <user name>@<computer name> <date> <time>.trx. For example, an automatically saved test results file for a solution called "Bank" could have the following path and name:

    <drive>:\Documents and Settings\<user name>\My Documents\Visual Studio 2010\Projects\Bank\TestResults\<user name>@COMPUTER1 2009-09-22 16:09:08
    

    Note

    You can change the way test results files are named by editing the Test run naming scheme. You can do this on the General page of the Options dialog box, which is displayed when you specify a run configuration. For more information, see How to: Specify Test Settings from Microsoft Visual Studio.

To import test results using Windows Explorer

  1. Using Windows Explorer, locate the folder that contains the test results file that you want to open.

  2. Double-click the test results file.

    This opens the file in Visual Studio and shows the results in the Test Results window.

To import test results using the Visual Studio Test Results window

  1. Display the Test Results window. To do this, click Test, point to Windows, and then click Test Results.

  2. Click Import Test Results on the Test Results window toolbar.

    The Load results dialog box appears. It displays contents of the My Documents folder. The dialog box displays all files in that folder that have a .trx extension.

  3. Click the test results file that you want to import, and then click Open.

    The test results are displayed in the Test Results window.

To import test results using the Visual Studio File menu

  1. On the File menu, point to Open and then click File.

    The Open File dialog box is displayed.

  2. Locate the folder that contains the test results file that you want to import.

  3. Click the test results file that you want to import, and then click Open.

    The test results are displayed in the Test Results window.

See Also

Tasks

How to: Export Test Results

How to: Specify Test Settings from Microsoft Visual Studio

How to: Delete Test Results

How to: Publish Test Results

How to: Enable Reporting of Test Results