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.
Associate a test with one or more work items. For more information, see How to: Associate a Work Item with a Test.
Set the test's Project Area and Iteration properties. This is described in Setting Properties.
To be able to edit these properties, you need to have Team Explorer installed. For more information, see Installation Overview for Team Foundation Server.
Publish test result data to the operational store. For more information, see How to: Publish Test Results.
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.
To set the project area and iteration properties
Connect to a Team Foundation Server computer. For more information, see How to: Connect to Team Foundation Server.
Click View and then click Team Explorer.
The Team Explorer window appears. It displays the hierarchy of your team project.
Click the Team Foundation Server project in which your software is being developed.
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.
In the Properties window, click Project Area.
In the values column of the Project Area row, click the ellipsis (…) button.
The Project Area dialog box is displayed.
In the Project Area dialog box, click the down arrow in the Node in Project Area drop-down box.
Select a node and click OK.
In the Properties window, click Iteration.
In the values column of the Iteration row, click the ellipsis (…) button.
The Iteration dialog box is displayed.
In the Iteration dialog box, click the down arrow in the Node in Iteration drop-down box.
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.