How to: Enable Reporting of Test Results

The reporting mechanism of Team Foundation Server generates reports of various kinds. Several tasks are associated with enabling the generation of test-results data reports. Although only the last step, publishing to the operational store, is required for reporting, some reports may be uninteresting without the first two steps.

  1. Associate a test with one or more work items. For more information, see How to: Associate a Work Item with a Test.

  2. Set the test's Project Area and Iteration properties. This is described in Setting Properties.

    Note

    To be able to edit these properties, you need to have Team Explorer installed. For more information, see Installation Overview for Team Foundation Server.

  3. Publish test result data to the operational store. For more information, see How to: Publish Test Results.

    Note

    The order of these steps is important. If you associate the test with work items or set the test's properties after you publish test results, the changes you made will not be reflected in the published test results.

You can also link a test result to a work item. To do this, you must also publish test results, but you will be prompted to publish if you have not already done so.

The Project Area and Iteration Properties

In the following procedure, you set a test's Project Area and Iteration properties. Both of these properties refer to concepts that are used when you manage the components and features of team projects, by using Team Foundation Server.

  • Project Area. When you set the Project Area property of a test, you place the test within a team project's organizational structure. The project area is the particular node in the team project hierarchy to which the test belongs.

  • Iteration. When you set the Iteration property of a test, you place the test within the hierarchy of events in the lifecycle of the team project.

For more information, see Setting Initial Project Areas or Iterations.

Setting Properties

To set the project area and iteration properties

  1. Connect to a Team Foundation Server computer. For more information, see How to: Connect to Team Foundation Server.

  2. Click View and then click Team Explorer.

    The Team Explorer window appears. It displays the hierarchy of your team project.

  3. Click the Team Foundation Server project in which your software is being developed.

  4. In the Test List Editor or the Test View window, click the test for which you want to publish results and press F4 to open the Properties window.

  5. In the Properties window, click Project Area.

  6. In the values column of the Project Area row, click the ellipsis (…) button.

    The Project Area dialog box is displayed.

  7. In the Project Area dialog box, click the down arrow in the Node in Project Area drop-down box.

  8. Select a node and click OK.

  9. In the Properties window, click Iteration.

  10. In the values column of the Iteration row, click the ellipsis (…) button.

    The Iteration dialog box is displayed.

  11. In the Iteration dialog box, click the down arrow in the Node in Iteration drop-down box.

  12. Select an iteration, or the ProjectLifecycle node, and click OK.

    The iteration is displayed in the Iteration row of the Properties window, in the following format:

    \<project name>\ProjectLifecycle\Iteration <iteration number>

    After you run this test and publish its results, they will be available as data for reports generated in Team Foundation Server.

See Also

Tasks

How to: Publish Test Results

How to: Associate a Work Item with a Test

How to: Connect to Team Foundation Server

Concepts

Installation Overview for Team Foundation Server