Delete test artifacts in Azure Boards

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

While test artifacts such as test plans, test suites, test cases, and so on, are all types of work items, the method for deleting them differs from deleting non-test work items.

Important

We only support permanent deletion of test artifacts such as test plans, test suites, test cases, shared steps and shared parameters. Deleted test artifacts won't appear in the recycle bin and cannot be restored. Deletion of test artifacts not only deletes the selected test artifact but also all its associated child items such as child test suites, test points across all configurations, testers (the underlying test case work item doesn't get deleted), test results history, and other associated history.

When you delete test artifacts, the following actions occur:

  1. Removes the deleted test artifact from the test case management (TCM) data store and deletes the underlying work item
  2. Runs a job to delete all the child items both from the TCM side and the underlying work items. This action may take time (up to a few minutes) depending on the number of artifacts to be deleted.
  3. Causes all information in the work item tracking data store and TCM data store to be deleted and cannot be reactivated nor restored.

Prerequisites

  • To delete test runs, you must be a member of the Project Administrators group or have the project-level Delete test runs permission set to Allow.
  • To delete test plans and test suites, you must be a member of the Project Administrators group or have the Area Path node-level Manage test plans or Manage test suites permission set to Allow. If the user is not part of the project administrator group, then the user must have project-level Delete test runs permission set to Allow along with Area Path node level permissions.
  • To manage or delete test artifacts, you must also have your access level set to Basic + Test Plans or Visual Studio Enterprise. This level provides access to the full Test Plans feature set. Users with Basic access and with permissions to permanently delete work items and manage test artifacts can only delete orphaned test cases. That is, they can delete test cases created from Work that aren't linked to any test plans or test suites.

To delete test artifacts, the following restrictions and operations apply:

  • Users with Basic access and with permissions to permanently delete work items and manage test artifacts can only delete orphaned test cases. That is, they can delete test cases created from Work that aren't linked to any test plans or test suites.
  • When you delete a test plan, test suite, test case, shared steps, or shared parameters, you not only permanently delete them, you also delete all associated test artifacts such as test results.
  • You can't bulk delete test artifacts. If test artifacts are part of a bulk selection to be deleted, all other work items except the test artifact(s) get deleted.

Work item types that support the test experience

The following image illustrates the set of work item types that support the test experience and work with Microsoft Test Manager. These work item types are linked together using the link types shown.

Test management work item types.

From the web portal or Microsoft Test Manager, you can view which test cases are defined for a test suite, and which test suites are defined for a test plan. However, these objects aren't connected to each other through link types. For definitions of each field used in these work item types, see Query based on build and test integration fields.

Delete a test case, test suite, or test plan

  1. To delete a test case, test suite, or test plan, open it from the web portal and choose the Permanently delete option from the actions menu. (Bulk deletion isn't supported from a query results page.)

    Delete a test case and associated test artifacts from the web form.

    Note

    You'll only see the Permanently delete option if you have the necessary permissions and access.

  2. Confirm you want to actually delete the item.

    Confirm delete of test artifacts dialog.

  1. You can also delete a test plan directly from Test Plans. To delete a test plan, open Test Plans and choose More Actions for the plan you want to delete, and choose Delete.

    Screenshot of Test Plans page, delete a test plan.

  1. You can also delete a test plan directly from Test or Test Plans.

    Delete test plans and artifacts from Test pages.

  1. To delete shared steps and shared parameters, you need to first manually remove all references to them before you can delete them.

    Delete shared steps from form.