---
title: "Test Runs"
canonical: "https://docs.getxray.app/space/XRAYCLOUD/44565109/Test%20Runs"
format: markdown
---
<details>
<summary>Table of Contents</summary>

> Macro (toc)
</details>

# Introduction

A Test Run (sometimes simply referred to as a "run") occurs when a Test is scheduled for execution within a [Test Execution](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565117). Therefore, each time you execute a Test, you are performing a Test Run.

A Test Run is an internal instance of a Test scenario used to validate a specific version of source code or SUT (System Under Test) in a particular environment. A Test Run is not a Jira Issue; it's an internal Xray entity.

Multiple Test Runs allow you to detect code defects that could potentially lead to system failures more effectively.

Typically, you may encounter Test Runs within specific panels, such as in a Test Execution (one Test Run per Test) or on the Test Issue screen (which displays the history of previous runs for that Test).

> ℹ️ A Test Execution represents a task for executing multiple Tests. It contains as many Test Runs as there are Tests associated with it. Specifically, there is one Test Run per associated Test, allowing you to track the result of each Test individually.

# Test Run Advantages

A Test Run is highly beneficial because it allows for the precise tracking and management of individual Test Executions within a specific context. Here’s why a Test Run is advantageous:

- **Traceability and accountability**: a Test Run provides a clear record of when and how a test was executed, including the environment, data used, and the person responsible for the execution. This traceability is crucial for understanding the Testing process and identifying potential Issues or areas for improvement.
- **Version control**: since a Test Run captures the exact definition of a Test at the time of execution, it ensures that the results are tied to the specific version of the Test that was run. This is important because it prevents confusion if the Test definition changes later; you can always refer back to the exact conditions under which the Test was executed.
- **Contextual results**: each Test Run is associated with a specific Test Execution, meaning that results are contextualized within the broader scope of the testing effort, such as a release or sprint. This allows teams to see how a Test performed under particular conditions or environments, providing more meaningful insights into the product’s quality.
- **Customizable statuses**: Xray allows for the customization of [Test Run statuses](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565122), enabling teams to define and track the progress of their Tests in a way that aligns with their specific workflow. This flexibility ensures that the status of each Test is accurately reflected, making it easier to manage the overall Testing process.
- **Granular Reporting**: Test Runs facilitate detailed reporting on individual Test outcomes, making it possible to drill down into specific Issues, trends, or successes within a Test Execution. This granularity is vital for stakeholders who need to understand the quality of the product at a detailed level.
- **Integration with CI/CD**: In automated Testing, Test Runs are automatically generated and updated with results from Continuous Integration/Continuous Deployment (CI/CD) pipelines. This seamless integration ensures that the latest test results are always available, helping teams to quickly identify and address Issues in the development process.

# Test Run Contents

A Test Run contains a copy of the Test specification and associated [Preconditions](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565159). However, this specification includes only certain fields from these entities; not all fields are copied to the Test Run.

General custom fields, as well as the summary and description fields, are not replicated in the Test Run. Therefore, avoid using these fields to add important information to the Test specification.

Depending on the original type of the Test associated with this Test Run, the following fields are replicated in the Test Run:

|  | **Manual Tests** | **Cucumber Tests** | **Generic Tests** |
| --- | --- | --- | --- |
| Test | - Test Type
- Manual Steps | - Test Type
- Scenario | - Test Type
- Generic Test Definition |
| Linked Precondition(s) | - Precondition(s) Type
- Conditions | - Precondition(s) Type
- Conditions | - Precondition(s) Type
- Conditions |

Since a Test Run is related to the execution of a Test it contains comments and information about linked defects and evidence (i.e., attachments).

# Data Consistency

Test Runs represent the results of executing specific Test specifications at a particular moment in time, within the context of a Test Execution.

If you [change](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565122) the Test specification at any point, your existing Test Runs will remain unchanged (unless you choose to update them). This approach ensures data consistency and compliance with conformance regulations.

On the execution screen of a given Test Run, you will be presented with two options (Figure 1):

![image](media://cde7d2cd-d528-459a-a5ac-189ea60a6c6b)

- Merging the current Test specification with the current specification in the Test Run.
- Resetting the current Test Run, by copying the current Test specification to the Test Run and discarding all recorded results.

# Execution History

The execution history of a given Test Issue is available in the Test Issue screen in the Test Runs *History* section (Figure 2 - 2).

![Figure 2 - Test run](media://17fd9416-fe83-4de9-9af6-0dd77a1c53ac)

You can filter Test Runs using the Filters options (Figure 2 - 3) and refine your search by:

![Figure 3 - Filter](media://8036beb6-b13e-4e1d-8673-78ac2b38bca4)

- The **Project** with which the Test Execution of the current Test is associated with (Figure 3 - 1).
- The target release **Version** tested by the Test Execution the current Test is associated with (Figure 3 - 2).
- The **Status** of the Test Execution the current Test is associated with (Figure 3 - 3).
- The **Start** and **End** dates of the Test Execution the current Test is associated with (Figure 3 - 4).
- The **Test Environment** of the Test Executions the current Test is associated with (Figure 3 - 5).
- The **Clear** button, which empties all the Test Runs Filter fields (Figure 3 - 7).
- You can click *More* to access other filtering options (Figure 3 - 6).
- Once you're finished, click *Apply* (Figure 3 - 8).

The search results are displayed on the table immediately below the Test Runs Filter, containing the following columns:

- The **Execution Key** of the listed Test Execution the current Test is associated with.
- The **Fix Version** tested by the listed Test Execution the current Test is associated with.
- The **System Revision** tested by the listed Test Execution the current Test is associated with.
- The **Exec by,** who is the Assignee of the listed Test Execution the current Test is associated with.
- The **Start** and **End** dates of the listed Test Execution the current Test is associated with.
- The **Defects** related to the listed Test Execution the current Test is associated with
- the **Status** of the listed Test Execution the current Test is associated with.

# Operations

The **Execute Test** (Figure 4 - 1) and **Execute Test Inline** (Figure 4 - 2) actions are available in the Test Issue screen (Figure 4). 

![Figure 4 - Executing](media://7fb87265-169a-4f25-bb3e-6eb830565fd9)

## Executing a Test

### From a Test Issue

> Macro (ui-steps)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)

### Inline

To execute Test Runs inline from the Test Issue screen (Figure 4), this option must first be enabled in the [Xray administration screen](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565569). Additionally, the option to set the Test Run status manually - without executing all [Test Steps](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565316) (or Examples in the case of Cucumber Tests) - must be enabled in the Miscellaneous Settings, either in the [Project Settings](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44567037) or [Global Settings](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44566331).

If these options are enabled and you have permission to execute the Test, the context menu for executing Test Runs, accessed via the *Execute* button on each Test Run will display the available transitions.

When executing Tests inline, the status of manual Steps (or Examples in the case of Cucumber Tests) can be changed automatically according to the following rules:

- <span style="color: #008000">**PASSED**</span><span style="color: #000000">: all Steps statuses will be changed to </span><span style="color: #339966">PASSED</span><span style="color: #000000">, regardless of their current status.</span>
- <span style="color: #ff0000">**FAILED**</span><span style="color: #000000">: all Steps statuses will remain unchanged, even if they are all </span><span style="color: #339966">PASSED</span><span style="color: #000000">, because a Test might fail due to a Precondition.</span>
- <span style="color: #808080">**TO DO**</span><span style="color: #000000">: all Steps statuses will be changed to </span><span style="color: #7a869a">TO DO</span><span style="color: #000000">.</span>
- <span style="color: #ffcc00">**EXECUTING**</span><span style="color: #000000">: the Test execution status will be changed to </span><span style="color: #ffcc00">EXECUTING</span><span style="color: #000000">.</span>
- <span style="color: #000000">**CUSTOM**</span><span style="color: #0000ff">: </span><span style="color: #000000">The Test execution status will be changed to the specified custom status.</span>

> Macro (ui-steps)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)

### Ad Hoc Test Execution

> Macro (ui-steps)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)

## Viewing the Test Execution Details

> Macro (ui-steps)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)

## Configuring Test Run Columns

Xray allows you to configure columns for the Test Runs table (Figure 10). This configuration is specific to each user and can be restored to the default configuration defined in the [Default Column Layouts](https://getxraydocs.atlassian.net/wiki/pages/createpage.action?spaceKey=xraycloud&title=Project%20Settings%3A%20Default%20Column%20Layouts&linkCreation=true&fromPageId=44565109) screen, in Xray's Project Settings.

Configuring Test Run columns in Xray is useful because it allows you to customize the view to display only the most relevant information for your specific testing needs. By selecting and organizing columns that show key details such as status, assignee, or environment, you can streamline the management of Test Runs, improve focus on critical data, and enhance overall efficiency in tracking Test progress and outcomes.

> ℹ️ Some columns may be fixed so you won't be able to remove them from the table.

To configure columns for the Test Runs table:

> Macro (ui-steps)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > ℹ️ You can restore the default columns by clicking *Restore Defaults* (Figure 10 - 3).

### Test Run-Specific Columns

The following columns (Figure 11 - 2) are not Jira fields, but they represent information stored internally by Xray for Test Runs.

![Figure 11 - Columns](media://c2d10fad-0e72-4c1f-b38a-eeff0629cc32)

You can also choose the columns below for your layout: 

- **TestRun Assignee **-** **the Test Run assignee.
- **TestRun Comment** -** **the Test Run comment.
- **TestRun Executed By** - the last user to execute the Test Run.
- **TestRun Started** - the Test Run start date.
- **TestRun Finished** - the Test Run finish date.
- <span style="color: #091e42">**TestRun Progress**</span><span style="color: #091e42"> - t</span>he Test Run progress.

To access them, click *Columns* (Figure 11 - 1) and scroll down (Figure 11 - 2). Once you're finished selecting the columns, click *Done* (Figure 11 - 3).

### Changing the Columns Order

> Macro (ui-steps)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)

### Restoring Columns to Default Configuration

> Macro (ui-steps)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)

## Archiving Test Runs

Xray allows you to [archive Test Runs](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44571909) one at a time or in bulk, as well as a way to check all the archived Test runs for a specific Test. 

Archiving Test Runs is useful because it helps you maintain a clean and organized workspace by removing outdated or irrelevant Test data from active view. This process enhances performance by reducing clutter in your [Test management environment](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565129) and allows you to better focus on current Test Runs. Additionally, archived Test Runs are preserved for historical reference and audit purposes, ensuring that past Test data can still be accessed if needed, without interfering with ongoing testing activities.

### Archiving a Single Test Run

> Macro (ui-steps)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)

### Bulk-Archiving Test Runs

> Macro (ui-steps)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)

### **Viewing Archived Test Runs**

> Macro (ui-steps)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)


> ℹ️ You can also [execute, assign, and remove Test Runs](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565117) (Figure 16 - 3).


<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/spaces/XRAYCLOUD/pages/44577312).
</details>