How to: Add a Test Result to a Work Item
After you run tests and obtain test results, you can create a work item directly from a test result, using the Test Results window. If the test result has already been published, it is automatically linked to the work item. If the test result has not yet been published, you will be prompted to publish it.
If you choose not to publish the test result, you can add it to the work item after the fact, as described in the following procedure.
The work item database resides on a Team Foundation Server computer. This means that you can create work items, including bugs, only if you have Team Explorer installed, and your Visual Studio user session is connected to a Team Foundation Server computer. For more information, see How to: Connect to Team Foundation Server.
To add a test result to a work item
Run tests, obtain test results, and create a work item from the test results. For more information, see How to: Create a Work Item from a Test Result.
Click View, and then click Team Explorer.
In Team Explorer, open the work item.
Click the Links tab.
The Add Link dialog box is displayed.
Click the down arrow in the Link type box.
Click Test Result.
The Choose Test Result dialog box is displayed.
Locate the published test result, select it, and then click OK.
(Optional) Type a comment for this link.
In the Add Link dialog box, click OK.
The link to the test result appears under the Links tab of the work item.