3

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?

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
Pascal Berger
  • 4,262
  • 2
  • 30
  • 54

5 Answers5

4

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

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60
3

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

Daniel
  • 71
  • 2
1

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

Abhijit Annaldas
  • 669
  • 4
  • 12
  • Would `witadmin` also work for VSTS (instead of On-Prem TFS)? And what do I need to install to get it? – Pascal Berger Dec 24 '15 at 10:17
  • Quote from MSDN: { The witadmin command-line tool only works when run against an on-premises TFS. To run the tool, open a Command Prompt window where either Visual Studio or Team Explorer is installed and enter: "cd %programfiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE" } | References:=> https://msdn.microsoft.com/en-us/library/dd312129.aspx | https://msdn.microsoft.com/en-us/library/dd236914.aspx – Abhijit Annaldas Dec 24 '15 at 15:36
  • As mentioned by Eddie, `witadmin` can be used for VSTS. – Pascal Berger Jan 04 '16 at 09:07
0

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.

yakya
  • 4,559
  • 2
  • 29
  • 31
-1

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

Tester
  • 13
  • 8
  • 1
    Oddly, I have the 'Permanently Delete' option (I'm the admin of my single-person VSTS project) but attempting to delete it this way tells me I don't have permission to delete work items. Odd since I should have every permission. – HgCoder Jan 13 '18 at 14:32
  • @HgCoder check my answer – yakya Aug 02 '18 at 17:39