---
title: "Coverage Analysis"
canonical: "https://docs.getxray.app/space/XRAYCLOUD/44565185/Coverage%20Analysis"
format: markdown
---
> Macro (ui-expand)
> 
> > Macro (toc)

# Introduction

Understanding the status of Tests and coverable Issues is crucial for managing and improving software quality. Xray provides powerful tools to analyze these entities from various perspectives, enabling teams to assess progress, identify gaps, and ensure comprehensive coverage.

This page outlines the key analysis scopes available in Xray, such as *Latest*, *Version*, *[Test Plan](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565153)*, and *Test Environment*, and explains how these dimensions influence the calculation of statuses.

You'll also learn how Xray calculates and displays the status of Tests and coverable Issues, both on the Issue view screen and within [Xray Built-in reports](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/338526916) like [Test Coverage](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565216) and [Tests List](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565196). These tools allow you to monitor the status of [Requirements](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565860), [Tests](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565156), and [Test Sets](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565163) in real time, ensuring that your Testing efforts align with project goals.

Additionally, troubleshooting tips are provided to address common challenges, such as discrepancies in coverage status or misconfigured versions. 

> ℹ️ ### Learn More
> ℹ️ 
> ℹ️ Please read [Understanding the calculation of coverage status and the status of Tests](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565101) for an in-depth explanation of the calculation of these statuses.

# Analysis Scopes

Tests and coverable Issues can be analyzed from different perspectives/scopes.

The same Test or Story can be analyzed, for example, on version 1.0 and also on version 2.0. This will take into account the respective executions made for those versions.

Therefore, a Story may be OK on version 1.0 but NOK on version 2.0 due to regression.

Tests and coverable Issues can be analyzed from these scopes (or dimensions):

- Latest.
- Version.
- Test Plan.

They can also be analyzed based on some additional criteria that will affect the calculated values, such as:

- <span style="color: #000000">[Test Environment](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565129)</span><span style="color: #000000">.</span>
- <span style="color: #000000">Final statuses have precedence over non-final ones.</span>

## Latest

If you don't care about versions, or you're not using versions at all and want to see the calculated statuses based on the latest runs, analysis by *Latest* can be used for that purpose (Figure 1 - 1).

![Figure 1 - Latest](media://2e070293-675f-42e9-8886-7fe2201d4b02)

This is useful for having a quick view of the latest results or calculated status for the Test or coverable Issue.

> ℹ️ When analyzing by latest results, the latest results made in the different environments (i.e., when *All Environments* is selected as Test Environment) are also considered.

## Version

The *Version* scope (Figure 2 - 1) allows users to analyze Tests and coverable Issues from a version perspective. It helps address such questions as:

- "How is the requirement on version X?"
- "How are these Tests performing on version Y?"

![Figure 2 - Version](media://054a1cec-7060-401c-8fea-0ef74d95aecf)

  
When analyzing by Version, only the Test Executions made for the given version are considered (i.e., the Test Execution's *Fix Version* field).

As an example, a user story aimed at version 3.0 may be analyzed from the perspective of the executions made for version 3.0 or for the ones made afterward, on version 4.0.

## Test Plan

Allows you to evaluate the Test status or coverage status based on some [planned Testing](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565044) (i.e., on the Tests and related executions made in the scope of the selected Test Plan).

When analyzing by Test Plan (Figure 3 - 1), only the [Test Executions](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565117) linked to that Test Plan are considered.

![Figure 3 - Test plan](media://711d27eb-3e22-4092-8f89-43517bb19c8c)

> ℹ️ This allows you to evaluate if a given coverable Issue is covered by the Tests of some Test Plan or not. If so, then you can see how is it going based on the executions performed from the related planned Test Executions.

## Test Environment

Analysis by Test Environment (Figure 3 - 2) allows you to analyze the Test status or the coverage status of an Issue for some Test Environment.

It addresses such questions as "How is this requirement doing on environment X?" 

When analyzing by Test Environment, only Test Executions made for the given Test Environment are considered.

## Final Statuses Precedence

Final statuses precedence (Figure 3 - 3) is used to perform the analysis based on finished work (non-intermediate [Test Runs](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565109)).

The *Final statuses have precedence over non-final* option allows you to consider just those Test Runs whose status is configured as a final status.

This helps address questions such as:

- "What is the current status of this Requirement (or Test)?" (if final statuses precedence is unchecked).
- "What is the status of this Requirement (or Test), considering just the finished work?" (if final statuses precedence is checked).

# Analyzing Xray Entities

Xray entities can be analyzed in the Issue view screen, as well as in specific reports containing those entities. 

## Coverable Issues

The status of coverable Issues can be evaluated directly in the Issue view screen as well as on some reports, including the Tests Coverage report.

### Issue Screen

Within the Issue screen (Figure 3), the coverage status can be evaluated for the specified scope within the Test Coverage section (Figure 3 - 4). The calculated coverage status is shown on the right (Figure 3 - 5).

### Reports

#### Test Coverage

Coverable Issues can be analyzed for a scope using the Test Coverage report (Figure 4). The chosen scope (Figure 4 - 1) will be stored in the user preferences and will affect all Issues in the same project.

![Figure 4 - Report](media://62692985-bebc-418d-bbff-446504fa4a57)

## Tests

The status of Tests can be evaluated directly in the Test Issue view screen as well as on some reports, including the Tests List report and, indirectly, the Test Sets List report.

Tests can also be evaluated in the coverable Issue screen, within the Test Coverage section (Figure 5 - 1).

### Issue Screen

Within the Test Issue screen (Figure 5), the Test status can be evaluated for the specified scope. The calculated status is cached for performance reasons. Since data between Jira and Xray may not be in sync, it's possible to enforce a recalculation to display an up-to-date value. The chosen scope (Figure 5 - 2) will be stored in the user preferences and will affect all Issues in the same project.

![Figure 5 - Test](media://2cf10821-986f-4378-aaed-9db23900947d)

### Reports

#### Tests List

The Tests can be analyzed for a scope using the [Tests List report](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565196) (Figure 6 - 1).

![Figure 6 - Report.png](media://77eadb12-e658-45f7-bb51-d9f55a18d4ee)

## Test Sets

The status of Test Sets (i.e., of the Tests contained within a Test Set) can be analyzed using the [Test Sets List report](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565199).

### Reports

#### Tests Sets List

The Test Sets, and implicitly the Tests within them, can be analyzed for a scope using the Test Sets List report (Figure 7 - 1).

![Figure 7 - Report](media://9d671752-a803-4534-a98e-839eb822c15e)

# Troubleshooting

<span style="color: #000000">Picture this scenario: "I have an Xray project to test my Requirements project. I've created a Test and I have already executed the Test, but I always get the Requirements status covered but not run."</span>

Potential explanations:

- You might be using environments on Test Executions that are affecting the aggregated status for the Tests. If you have a couple of Test Executions, one with a specific environment (e.g., Android) and another without any environment, then Xray will also consider the empty environment when calculating the aggregated status (if all Test Executions are within the same Version or Test Plan).
- You probably have not configured your versions properly. Remember that the coverage status of some Issues for some versions is calculated based on the Fix Version associated with the Test Execution Issues.

[Back to top](#top)

<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>