|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
How to: Create a Work Item from a Test Result
By using the Test Results window, you can create a bug directly from a test result.
A bug is a type of work item. 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.
To create a bug
To obtain test results, run one or more tests. For more information, see.
This displays one row in the Test Results window for each test you ran. You can now create one or more bugs for each row that is displayed. Each row is a test result.
In the Team Explorer window, select a project by clicking it.
You cannot create a bug from the Test Results window unless you have selected a project or a node under the project.
In the Test Results window, right-click the test result for which you want to create a bug, point to Create Work Item, and then click Bug.
After clicking Create Work Item, you could create any type of work item listed as an option, not necessarily a bug.
A New Bug page is displayed in the main editing window. This page is initialized with relevant data. For example, the bug's title is created from the name of the test and the error message that describes the test result. The new bug also has the test result attached, in the form of a .trx file.
(Optional) Edit the information on the New Bug page. You can, for example, change the bug's priority, its state, or the person to whom it is assigned. Additionally, you can add descriptive information and attach files.
Right-click the tab at the top of the New Bug page and then click Save New Bug.
The bug is saved and assigned a bug number.