3
votes

Is there a way to delete a Test Plan in Visual Studio Team Services or through Microsoft Test Manager for a project hosted on Visual Studio Team Services?

Delete buttons seems to be disabled and directly deleting the work item in VSTS is blocked:

The work item 1 cannot be deleted. Test Plan work items cannot be deleted. work items cannot be deleted.

Any other way to achieve this?

5

5 Answers

4
votes

As Abhijit mentioned, you need to use witadmin destroywi command to delete the test plan. This command works for VSTS too. But you need to make sure your account has "Team Foundation Administrators" permission. You can use this command directly from "Developer Command Prompt for VS" which is installed with VS. enter image description here

3
votes

I was just trying to delete a test plan, and saw that, in the web access of the test plan, if you hover over the name of the plan in the tree view on the left, there's an "x" that appears, and lets you delete the test plan! No command line needed :)

If relevant, though - we have an internally-hosted TFS. But the "x" I found doesn't match what the MS documentation seems to suggest.

Screenshot of TFS Web Page

1
votes

Deleting test plan in MTM 2010 is straight-forward (check the link below). While in MTM2012/2013 test plan can be deleted through developer command prompt.

In MTM2012/MTM2013, there is no direct way to delete a test plan. We need delete the corresponding work item using TFS command line options in command prompt in order to delete a test plan.

You can delete the test plan like this in Developer Command Prompt for VS2013:

witadmin destroywi /collection:XXXX / id: the test plan’s id

You can find the solution here:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/1efe30e3-5a1f-4ca2-abac-52dbeb0d592c/microsoft-test-manager-2013-how-to-delete-a-test-plan?forum=vsmantest

0
votes

If you followed the steps that are here and you still cannot delete test suites/plans etc., it means that your account subscription is Basic or Professional but not Enterprise which includes Test Manager as default. The thing is that in Basic subscriptions, you can create test suites but can't delete them (Annoying).

What you can do however is that you can get free trial for the Test Manager from here and then you will be able to delete them. I afraid there is no other way yet and you can vote the already existing feature request too if you want from here.

-1
votes

Yes. You can delete it via VSTS.

Just click on the ellipsis button (looks like 3 dots) on top right hand side and select “Permenantly delete”. It will prompt you to enter the test plan ID to confirm the delete. Note. Deleting the test plan will not delete any associated test cases. You will have to run the same process with the test cases. You will need administrative privileges in order to see the permanently delete option in the menu.

See: https://www.visualstudio.com/en-us/docs/work/backlogs/remove-delete-work-items#move-delete-permissions