Delete test artifacts in Azure Boards
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
Test artifacts such as test plans, test suites, and test cases are all considered work items in Azure DevOps. However, the method for deleting test artifacts differs from the method for deleting nontest work items.
Important
Permanent and Irreversible Deletion: Azure DevOps only supports the permanent deletion of test artifacts, including test plans, test suites, test cases, shared steps, and shared parameters. Deleted artifacts cannot be restored, and all associated child items, such as test results, are also removed. Additionally, bulk deletion of test artifacts is not supported; attempting to bulk delete results in the deletion of all other selected work items except the test artifacts.
Ensure you back up any necessary information before deleting test artifacts, as this action cannot be undone.
When you delete test artifacts, the following actions occur:
Remove from TCM data store:
- The deleted test artifact is removed from the Test Case Management (TCM) data store.
- The underlying work item associated with the test artifact is deleted.
Delete child items:
- A background job initiates the deletion of all child items from both the TCM data store and the underlying work items.
- This process might take a few minutes, depending on the number of artifacts being deleted.
Permanent deletion:
- All information in both the work item tracking data store and the TCM data store is permanently deleted.
- Deleted data can't be reactivated or restored under any circumstances.
Prerequisites
- Permissions:
- To delete test runs, 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, 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 isn't 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.
- Access levels: To manage or delete test artifacts, have at least Basic + Test Plans access 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, which means they can delete test cases created from Work that aren't linked to any test plans or test suites.
::: moniker-end
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.
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
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.
Note
You only see the Permanently delete option if you have the necessary permissions and access.
Confirm you want to delete the item.
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.
You can also delete a test plan directly from Test or Test Plans.
- To delete shared steps and shared parameters, first manually remove all references to them before you can delete them.