Deleting and restoring test artifacts

When you delete a test artifact, it is moved to the Trash page, but it is not permanently deleted from the database. From the Trash page, you can restore the artifacts or permanently delete the artifacts from the database.

Attention: Artifacts that are permanently deleted cannot be recovered, see Table 1.
Remember: For projects that are enabled for configuration management, when you permanently delete an artifact, all the versions of the artifact are deleted from across the configurations (streams and baselines) and cannot be recovered.

Required permissions to delete and restore artifacts

As a safeguard against accidental deletions, only users who have the Permanently Delete permission can permanently delete artifacts. For information on role-based permissions for each operation, see Quality Management role-based permissions.

If you have the permissions to delete test artifacts, you can delete them by showing the artifacts in a list view and then selecting from the action menu. To delete artifacts that cannot be shown in a list view, such as categories and custom attributes, use the artifact editor.

When you permanently delete an artifact, its related work items are not deleted. Those work items are used by the test artifacts only and are not shown in reports, queries, dashboards, external links, and editors.

To restore artifacts, you must have the Restore permission. For more information about required permissions, see the related help topic about Quality Management role-based permissions.

Restoring and permanently deleting on the Trash page

You can access the Trash page from the Administration menu. In that view, you can select the type of artifact to view from the View list, and then restore or permanently delete artifacts.

To restore an artifact, select the artifact, and from the action menu, click Restore Artifact Restore Artifact.

To view permanently deleted artifacts, select Audit from the View As list. Attachments are not in the list of permanently deleted artifacts. To permanently delete an artifact on the Trash page, from the View As list, select Trash, and then select the artifact. From that artifact’s action menu, click Delete Artifact Permanently Delete.

You can configure the columns in both Trash and Audit lists. To specify which columns to display, modify the column widths, or reorder the columns, click Change column display settings. You can also set display options for rows, cell text, and font size.

Remember: When you permanently delete a test artifact from the Trash page, no rows are physically removed from the database. The item ID still exists, but the fields on the item and history are replaced with empty values.

Deleting attachments

Attachments are stored in the database independently of the artifacts that reference them. The attachments remain in the database until they are permanently deleted. You can permanently delete attachments, however a best practice would be to first permanently delete the artifact that it is attached to. As you delete the artifact, a window opens from which you can permanently delete attachments.

If you have the Administrator role and have enabled asynchronous migration, you can use the Manage Artifact Attachments option on the Administration menu. The list view on the page shows the attachments in the project area, such as attachments added to artifacts, images added to the rich-text editor, and data files associated with test data. You can delete the attachments if you have the permission assigned. Deleted attachments are not included in the artifact editors, but are still functional for test data and displayed in the rich-text editor. You can restore deleted attachments from the Trash view or permanently delete them if you have the permission assigned. The rich-text editor displays a file-not-found link for the permanently deleted attachment. Test data with an associated data file that is permanently deleted is not functional. Test executions using the test data will fail.

Test artifacts that included permanently deleted attachments might still contain references to those attachments. Artifacts that link to a deleted attachment include a link to a new attachment, named Deleted.txt. That .txt file contains one word: Deleted.

Usually, deleted artifacts are not shown in search results. However, you might still find links to deleted artifacts from artifacts that are not deleted.

Deleting review-enabled artifacts

You can permanently delete any artifact that has been assigned for formal review. When you delete the review-enabled artifact, all of the associated approval groups are deleted from the repository and any sensitive data in them is also no longer accessible.

Deletion information by artifact type

Because test artifacts often depend on each other, the deletion or restoration of one artifact can affect several other artifacts. In general, when an artifact is deleted or restored, its linked artifacts remain unchanged. For example, if you delete a test case, its test scripts are not deleted. Artifacts that link to the deleted artifact no longer show the link. For example, if a test case is deleted, a test plan that links to that test case no longer shows the link to the test case. For exceptions to this behavior, see the following table.

Table 1. Important information about deleting artifacts.
Note: Every test artifact has separate permissions for the delete, restore, or permanently delete action that each role can perform. You can view the list of available permissions from the Manage Project Properties page under the Administration menu.
Artifact type Delete support Notes Restore support Notes Permanent delete support Notes
Attachments Yes   Yes   Yes

Deleted attachments are not included in the artifact editors, but are still functional for test data and displayed in the rich-text editor. You can restore deleted attachments from the Trash page or permanently delete them if you have the Permanently Delete permission for attachments. The rich-text editor displays a file-not-found link for the permanently deleted attachment.

If multiple test artifacts link to a deleted attachment, those artifacts include a link to a new attachment, named Deleted.txt. That file contains one word: Deleted.

Build definitions and build records Yes

If you delete a build definition or build record that is a synchronized copy of an artifact from an external build tool, the original build definition or build record is not deleted from the external build tool. If you do not also delete the build definition or build record from the external tool, the build definition or build record is added back to the QM application during the next synchronization. Before you delete the build definition or build record from Engineering Test Management, delete it from the external tool.

You can delete build records from a build definition that was created in Engineering Test Management or that was created by using the REST API. However, you cannot delete build records from a synchronized copy of a build definition.

When you delete a build record, its build definition is updated.

Yes   Yes  
Category Yes Associated Category values are also moved to the Trash page. Yes Associated category values are also restored. Yes

To permanently delete a category, you must have the Permanently Delete permission for categories and category values.

If you permanently delete a category, all category values are also permanently deleted.

The category and its values are removed from all artifacts.

Category value Yes   Yes

If the category that is associated with the category value is deleted, restore the category. Then, the associated category values are also restored.

If the category that is associated with the category value is permanently deleted, you cannot restore the category value.

Yes The category value is removed from all artifacts.
Channels Yes

When you Delete a Channel, a dialog box to synchronize channels and test environments opens. You can select Synchronize or you can Cancel the operation.

For more information, see Creating and managing channels.

Yes   Yes  
Custom attribute Yes The custom attribute is removed from all of the artifacts. Yes   Yes The custom attribute is removed from all of the artifacts.
Enumerated Custom Attribute Value Yes   Yes   Yes After they are deleted, they are no longer visible on execution scripts.
Execution schedules Yes The deleted execution schedule and its associated results are moved to the Trash page. No The deleted execution schedule cannot be restored. Yes Administrators can permanently delete the execution schedule and its associated results from the Trash page. When an execution schedule is permanently deleted, its associated results are also deleted.

After execution schedules or their results are permanently deleted, they cannot be restored and are not listed in the Audit view.

Execution schedule results Yes The Execution schedule results are deleted when its associated execution schedule is deleted. You can also delete it from the execution schedule results history table. The deleted results are moved to the Trash page. The name of the deleted result includes Result - <schedule name> to clearly indicate to which schedule the deleted result belongs to. No The deleted execution schedule results cannot be restored. Yes Administrators can permanently delete the deleted execution schedule results from the Trash page.

After execution schedules results are permanently deleted, they cannot be restored and are not listed in the Audit view.

Keywords Yes You can delete all keyword attachments. Yes   Yes When you permanently delete a keyword, all snapshots of the keyword are also permanently deleted.
Project Execution Variable Yes If you delete the execution variable, all references to it are also removed from the test artifacts. Yes   Yes You can permanently delete project execution variables. After they are deleted, execution variables are not visible in the artifact that they belong to, not even during an execution or execution result. All of their execution values are also deleted.
Quality Objectives Yes If the deleted objectives are associated to test plans, they are not visible anymore. Yes   Yes  
Template Yes Artifacts that use the deleted template section are not changed. Yes Administrators can restore deleted artifact templates from the Trash page. Yes You can permanently delete templates. These permanently deleted artifact templates are visible in the audit history view. However, the template's associated sections are not deleted.
Template section Yes Artifacts that use the deleted template section are not changed. Yes   Yes Multiple templates might use the same template section. If you delete a template section from one template, it is also removed from all other templates that use the section.
Test case Yes All of the associated test case execution records and test case results are moved to the Trash page. Yes All of the associated test case execution records and test case results are also restored. Yes

When you permanently delete a test case, all snapshots of the test case are also permanently deleted.

If you permanently delete a test case, you cannot restore the associated execution records and results.

Test case execution record Yes All of the associated test case results are moved to the Trash page. Yes

If the test case that is associated with the test case execution record is deleted, restore the test case. Then, the associated test case execution records are also restored.

If the test case that is associated with the test case execution record is permanently deleted, you cannot restore the test case execution record.

Yes If you permanently delete a test case execution record, you cannot restore the associated results.
Test case result Yes

Active test runs that are associated with the deleted test case result are canceled.

Active test suite runs that are associated with the deleted test case result are canceled.

Yes

If the test case execution record that is associated with the test case result is deleted, restore the test case execution record. Then, the associated test case results are also restored.

If the test case execution record that is associated with the test case result is permanently deleted, you cannot restore the test case result.

Yes  
Test cell Yes The Test cell is deleted from the test cell table view and moved to the Trash page. Yes   Yes  
Test data Yes Test executions that are using the deleted test data fail. If you open the test data in the editor, you are warned to delete the test data or use another data file. Yes   Yes

You can permanently delete all test data attachments. Test data with an associated data file that is permanently deleted is not functional.

When you permanently delete test data, all snapshots of the test data are also permanently deleted.

Test plan Yes Yes   Yes When you permanently delete a test plan, all associated snapshots and associated sizing records of the test plan are also permanently deleted.
Test script Yes   Yes   Yes When you permanently delete a test script, all snapshots of the test script are also permanently deleted.
Test suite Yes All of the associated test suite execution records and test suite results are moved to the Trash page. Yes All of the associated test suite execution records and test suite results are also restored. Yes

When you permanently delete a test suite, all snapshots of the test suite are also permanently deleted.

If you permanently delete a test suite, you cannot restore the associated execution records and results.

Test suite execution record Yes All of the associated test suite results are moved to the Trash page. Yes

All of the associated test suite results are also restored.

If the test suite that is associated with the test suite execution record is deleted, restore the test suite. Then, the associated test suite execution records are also restored.

If the test suite that is associated with the test suite execution record is permanently deleted, you cannot restore the test suite execution record.

Yes If you permanently delete a test suite execution record, you cannot restore the associated results.
Test suite result Yes   Yes

If the test suite execution record that is associated with the test suite result is deleted, restore the test suite execution record. Then, the associated test suite results are also restored.

If the test suite execution record that is associated with the test suite result is permanently deleted, you cannot restore the test suite result.

Yes  
Table 2. Artifacts that support permanent deletion but are not visible in Trash view
Artifact Description
Adapter task Adapters can be deleted from the adapter console.
Artifact execution variable and values Both are deleted when they are removed from the containing artifact.
Automation Completed and canceled automation jobs are automatically deleted in a daily task.
Execution request Requests completed or canceled are automatically deleted in a daily task or when its test case result is deleted.
Execution variable Execution variables are deleted and no longer visible when they are removed from the artifacts (test cases, test suites, execution scripts, keywords, or execution results) that contain them.
Formal review All formal review data is deleted when the containing artifact is permanently deleted.
Lab resource type attribute Allowed to delete hidden items from the catalog. Deletion is permanent. Also, an attribute is deleted when its containing type is deleted.
Lab resource type Allowed to delete hidden items from the catalog. Deletion is permanent.
Project execution variable value Values are deleted when the project execution variable they belong to is permanently deleted.
Request Requests for lab management are deleted after period specified in the task DeleteInactiveRequestsTask on the administration page, under Advance Properties. Set the Expiration Period property to the expiration time. By default, this task is not run.
Reservation Canceled and ended reservations are deleted by a daily task.
Sizing record Deleted when purging containing test plan.
Test data variable Permanently deleted when its related test data is permanently deleted.
Test schedule Test schedules are permanently deleted when its parent test plan is also deleted permanently.
Table 3. Artifacts that do not support permanent deletion
Artifact Deleting an artifact (moving to the Trash page) Deleting and scrubbing an artifact (moving to the Trash page) Restoring an artifact (moving from the Trash page)
Baseline If you delete a baseline, it is moved to the Trash page.   You can restore a baseline from the Trash page only when the associated component is not deleted. If a component is deleted, the associated baseline is automatically restored when the component is restored.
Component If you delete a component, it is moved to the Trash page. All configurations (baselines and streams) that are associated with the component are also moved to the Trash page. If you delete and scrub a component, it is scrubbed and moved to the Trash page. All configurations (baselines and streams) that are associated with the component are also moved to the Trash page (but not scrubbed).

You can restore a component from the Trash page.

When a component is deleted:

If you restore the component, all the associated configurations are automatically restored.

When a component is deleted and scrubbed:

If you restore the component, all the associated configurations are automatically restored, but the name and history of the component is permanently deleted.

Stream If you delete a stream, it is moved to the Trash page.   You can restore a stream from the Trash page only when the associated component is not deleted. If a component is deleted, the associated stream is automatically restored when the component is restored.
For details on permanently deleting lab resources, see Deletion and restoration of lab resources.