How to: Submit a Bug Using Microsoft Visual Studio
You can submit a bug using Visual Studio at any time. You can manually attach information to this bug and link it to other work items. Using Visual Studio to submit a bug does not automatically add data that was collected when a test was run, unlike when you create a bug using Test Runner or Microsoft Test Manager. For more information about these methods, see Submitting Bugs.
You can submit a bug from Visual Studio without having to switch to Microsoft Test Manager. For example, you perform ad hoc testing and find a bug, or you notice incorrect behavior from discussion of the application under test. You can also create a bug about a particular test result from the Test Runs window and you can link a test result to an existing work item.
To submit a bug using Microsoft Visual Studio
To open the Team Explorer view to connect to Team Foundation Server, click Tools and point to Connect to Team Foundation Server. Select the server from the list of servers.
For more information about how to connect to Team Foundation Server, see How to: Connect to a Team Project in Team Foundation Server.
To connect to a specific team project, select the team project and then click Connect.
To create a bug, right-click Work Items then click Add Work Item and point to Bug.
The New Bug tab is displayed.
Type an appropriate title in Title.
Click Area to select the appropriate area in the team project for this bug.
Click Iteration to select the appropriate iteration for this bug.
(Optional) To select the user to assign to this bug, click Assigned to.
(Optional) To change the state of this bug from the default state of active, click State.
(Optional) To enter the reason for this bug, click Reason.
To assign a priority to the bug, click Priority.
To assign a severity to the bug, click Severity.
To enter the details to re-create the bug, click Details.
(Optional) To enter the system information, click System Info.
(Optional) To link this bug to specific test cases, click Test Cases. Click Add and then click Browse to search for the test cases to link to this bug.
(Optional) To add attachments to this bug, click Attachments. Any file can be added. For example, you could add a video recording file, a screen shot file or a log file.
To save the bug, click Save on the toolbar.
To create a bug from a test result
Open the test run with the test results you want.
On the Test menu, point to Windows, and then click Test Runs.
In the Test Runs window, in the Connect list, click the down arrow, and then click Connect to test run.
In the Connect to Controller or Local Results dialog box, select either a remote controller or a local directory and then click OK.
Note
If you select a local directory, click Browse to find the correct TestResults folder. By default, results for locally run tests are saved to Visual Studio 2010\Projects\Project Name\TestResults.
- In the Test Runs window, double-click a test run to open the results of that run in the Test Results window.
Note
How many runs are available depends a setting in the Options dialog box that limits the number of test runs that can be saved.
In the Test Results window, right-click the test you want to create a work item for and click Create Work Item.
In the Test Run Not Yet Published message box, click Yes to publish your test results. Publishing test runs makes them available to the work item.
In the Publish Test Results dialog box, select the test runs you want to publish and click OK.
How many runs are available depends a setting in the Options dialog box that limits how many test runs are saved.
Select the build against which you ran the tests, select a Build flavor, and then click OK.
Fill out the work item form and in the toolbar, click Save Work Item.
The work item is added to your team project and a link to the test results file appears on the attachments tab. When you open the attachment the test results open in the Test Results window.
To link a test result to an existing bug
Open the test run with the test results you want.
On the Test menu, point to Windows, and then click Test Runs.
In the Test Runs window, in the Connect list, click the down arrow, and then click Connect to test run.
In the Connect to Controller or Local Results dialog box, select either a remote controller or a local directory and then click OK.
Note
If you select a local directory, click Browse to find the correct TestResults folder. By default, results for locally run tests are saved to Visual Studio 2010\Projects\Project Name\TestResults.
In the Test Runs window, double-click a test run to open the results of that run in the Test Results window.
Right-click the test run and click Add to Work Item.
In the Test Run Not Yet Published message box, click Yes to publish your test results. Publishing test runs makes them available to the work item.
In the Publish Test Results dialog box, select the test runs you want to link to from the work item, select the build against which you ran the tests, select a Build flavor, and then click OK.
How many runs are available depends a setting in the Options dialog box that limits how many test runs are saved.
In the Work Items Picker, locate and click the work item, and then click OK.
The work item is added to your team project and a link to the test results file appears on the attachments tab. When you open the attachment the test results open in the Test Results window.