Saturday, December 12, 2009

Remove a test case from the Visual Studio 2010 Test and Lab Manager

Together with our test team we’re trying the new Visual Studio 2010 Test and Lab Manager. One of the questions of our lead test manager was how he could remove some useless test cases. As test cases are represented by work items, the answer is not so easy. Work Items by nature can’t be removed and this remains the same in Visual Studio 2010.

Although it’s a tad inconvenient, you can delete work items from TFS by installing the Team Foundation Server Power Tools . Of the many features available as part of the power tools, there is a command called destroywi that can be used to delete work items.  For example, to delete the work item ID 1234, use the command:

   1:  tfpt destroywi /server:tfs-dev /workitemid:1234

Use this feature at your own risk. Of course from a user perspective this is not the best solution. So better is to just delete the test case from the suite by selecting it, and press the delete key, or the delete button on the toolbar. You can then edit the test case, and move it to 'closed'.

1 comment:

Anonymous said...

Some parts of previous releases of TFS Power Tools are now included in the core VS 2010 product. VS 2010 includes the witadmin command line utility.

:\>witadmin destroywi /collection:collectionurl /id:id

will permanently delete work items.