---
title: "Test Execution Archiving"
canonical: "https://docs.getxray.app/space/XRAY/301470346/Test%20Execution%20Archiving"
format: markdown
---
> ℹ️ Admin feature only.

> Macro (rw-ui-expands-macro)
> 
> > Macro (rw-expand)

> Macro (ui-expand)
> 
> > Macro (toc)

# <span style="color: #172b4d">Introduction</span>

As an Xray administrator, you can configure thresholds for archiving <span style="color: #172b4d">[Test Executions](https://getxraydocs.atlassian.net/wiki/display/XRAY790/Test+Execution)</span>.

**Test Execution Archiving** enables the cleanup of unused [Test Runs](https://getxraydocs.atlassian.net/wiki/display/XRAY790/Test+Runs) and Test Executions, reducing the number of historical Test Runs that may add complexity without providing value or defining the status of any [Requirements](https://getxraydocs.atlassian.net/wiki/display/XRAY790/Requirements+and+Defects).

> ℹ️ <span style="color: #172b4d">Check </span><span style="color: #172b4d">[Test Run Archiving ](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/301403991)</span><span style="color: #172b4d">and </span><span style="color: #172b4d">[Archiving Xray Issues](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/301403991)</span><span style="color: #172b4d"> for additional information.</span>

# <span style="color: #172b4d">How it Works</span>

Archiving Test Executions allows you to hide them in Xray/Jira while preserving their data, so you can access it if needed later. This helps reduce clutter in Xray and Jira views, especially when importing <span style="color: #172b4d">[automated Test results](https://getxraydocs.atlassian.net/wiki/display/XRAY790/Working+with+Automated+Tests)</span> into Xray.

Test Runs can accumulate quickly, but usually, only the latest results are relevant. Older Test Execution Issues can be archived automatically by Xray, using Jira's <span style="color: #172b4d">[Issue archiving mechanism](https://confluence.atlassian.com/display/ADMINJIRASERVER/Archiving+an+issue)</span>.

## <span style="color: #172b4d">Archived Test Executions Data</span>

**Archiving Test Executions does not delete Test Run data**. Archived Test Execution Issues are hidden from Issue views, [Xray reports](https://getxraydocs.atlassian.net/wiki/display/XRAY790/Built-in+Reports) and gadgets, and will not appear in Issue searches. To locate them, you will need to save their Issue key.

You can access archived Test Executions like any other archived Issues in Jira; however, Test Run data will only be visible once the [Test Execution Issue is unarchived](https://confluence.atlassian.com/adminjiraserver/archiving-an-issue-968669980.html).

## <span style="color: #172b4d">Test Executions Eligible for Archiving</span>

All Test Executions within the selected projects (Figure 2 - 3) are eligible for archiving, except those with Test Runs that directly impact Requirement status. For example, if Requirement A is marked as "FAIL/NOT OK" due to Test Run A, this Test Run will not be archived, as it reflects the current status of Requirement A in Xray reports. The same holds true for Test Runs that affect the latest results in a specific version, <span style="color: #172b4d">[Test Plan](https://getxraydocs.atlassian.net/wiki/display/XRAY790/Test+Plan)</span>, or environment. <span style="color: #172b4d">**Therefore, a Test Execution will only be archived if none of its Test Runs affect the Requirement status and all Issues it contains are eligible for archiving.**</span>

When calculating the threshold for archiving, Xray evaluates all Test Runs finished on data associated with a Test Execution Issue and verifies whether all of them meet the configured threshold criteria. Only Test Execution Issues where all Test Runs are eligible based on the configured threshold will be considered for archiving.

## <span style="color: #172b4d">Unarchived Test Executions</span>

If a Test Execution is manually unarchived, **it will not be affected** by the scheduled automated Test Execution Archiving process again **within 24 hours** due to performance reasons.

# <span style="color: #172b4d">Access</span>

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> On your Jira Data Center instance, click the gear icon (Figure 1 - 1) and then select *Manage Apps* (Figure 1 - 2).
> 
> ![Figure 1 - Access](media://f3e4cecd-3e7d-414d-b5b5-d808b8b07cf9)
> 
> > Macro (rw-step)
> 
> An Xray menu will open on the left side of the screen. There, click the *Test Execution Archiving* option (Figure 2 - 1) and the Test Execution Archiving screen opens (Figure 2).
> 
> ![Figure 2 - Menu](media://2e199b22-3d18-4aae-a867-603d3bb8773d)

# Configuration

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> ## Feature Enablement
> 
> Use the toggle (Figure 2 - 2) to enable/disable the Test Execution Archiving.
> 
> > Macro (rw-step)
> 
> ## Adding Projects
> 
> You can add Projects by clicking the *Add Projects* button (Figure 2 - 3) and selecting the projects containing the Test Execution Issues you wish to archive. Then, they will appear right there (Figure 2 - 3).
> 
> > Macro (rw-step)
> 
> ## Configuring the Threshold for Archiving Test Executions
> 
> The threshold can be set to a value between one day and two years. Use the slider (Figure 2 - 4) or select one of the predefined time frames (Figure 2 - 5) to choose the desired value, with a maximum limit of two years.
> 
> You can also specify how frequently you want Test Execution Issues to be archived (Figure 2 - 6).
> 
> > Macro (rw-step)
> 
> Once you're finished, click *Save* (Figure 2 - 7).


<details>
<summary>Support/Troubleshooting</summary>

If you have questions or technical issues, please [contact the Support team via the Customer Portal (Jira service management)](https://jira.getxray.app/servicedesk/customer/portal/2/user/login?destination=portal%2F2%2Fcreate%2F28) or [send us a message using the in-app chat](https://getxraydocs.atlassian.net/wiki/display/XRAY/In-App+Chat+Support).
</details>