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

> Macro (toc)
</details>

# Introduction

You can execute your [Tests](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565156) either manually or [automatically](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565278). Even if a Test is automated, you can manually set the Test status for that execution. Additionally, you have the option to create custom statuses.

Tests are always executed within the context of a [Test Execution](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565117), even if it's an ad hoc execution. You can execute Tests inline (i.e., define the [Test Run](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565109) status) directly on the Test Execution Issue screen, or you can use the Test Execution Screen (Figure 1), which is detailed extensively below.

A Test Execution validates whether all the Tests in a specific environment or target have passed. Each Test has its own execution page with detailed information on how to execute, monitor progress, and report results. Each Test associated with a Test Execution is referred to as a Test Run. A Test Run is an instance of the Test that contains a copy of the Test definition (e.g., description, steps) and the result of that Test within the context of the Test Execution.

When a Test definition is modified, the corresponding Test Runs are not automatically updated. This is because the execution of a Test directly depends on its definition. Each time a Test Run is created, the Test definition is copied. This ensures that when the Test definition changes, the Test Runs are not affected and will always contain the original Test definition as it was when the Test was added to the Test Execution.

# Permissions

You are allowed to execute a Test if:

- You have permission to **"Browse"** the Test Execution Issue.
- You have permission to **"Resolve"** the Test Execution Issue.
- The Test Execution Issue is not in a status configured to disallow executions.
- The Test Issue is not in a status configured to disallow executions.

Even though you might not have permission to execute a Test Run, if the execution has already started, you can see the execution details page in **read-only** mode. An informative message will be shown at the top of the execution page if the current Test Run is in read-only mode.


> ℹ️ Find more about how you can disallow executions based on the workflow status of Test or Test Execution Issues:
> ℹ️ 
> ℹ️ - [Global Settings: Miscellaneous](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44566331)
> ℹ️ - [Using Jira Workflows for Testing Purposes](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44567832)

# Test Execution Screen

When you execute a Test, the Xray Execution screen is shown (Figure 1).

![Figure 1 - Test execution](media://ae604e8b-1d62-4d44-9279-662fdca47df3)

The execution screen (Figure 1) is divided into several sections, appearing in this order:

1. Navigation and Actions** **(Figure 1 - 1).
2. Execution Status and General Information (Figure 1 - 6).
3. Findings (Figure 1 - 7).
4. Test details (Figure 1 - 8.
5. Activity (Figure 1 - 9).

This screen (Figure 1) is accessible from the Test Execution Issue screen (Figure 2), by clicking *Test Runs* (Figure 2 - 1) and then, on the desired row, clicking the play icon (Figure 2 - 2). This is where the execution results are displayed and registered. This screen contains information about the Test definition and the Test Execution Issue context to allow you to execute the Test without exiting this screen.

![Figure 2 - Test execution](media://34c83217-d355-46d3-8766-ce0904328459)

## Navigation and Actions

> ℹ️ The Export Test Definitions and Import Execution Results actions are useful when you need to perform an ad-hoc execution for an automated Test. Typically, automated Tests are executed on a Continuous Integration platform, with the results imported automatically into Xray, creating new Test Execution Issues. However, you can also execute each automated Test individually and manually import the execution result.

The Navigation and Actions bar (Figure 1 - 1) is always available to help you navigate the Test Issue hierarchy. It also contains a toolbar with navigation buttons (Figure 1 - 2) that allow you to return to the Test Execution (Figure 2), jump to the previous or next Test Execution issue page, or navigate to other Tests within the same Test Execution, if applicable.

On this bar, you can also find the following actions:

- **Executing with the ****[Xray Exploratory App](https://www.getxray.app/exploratory-testing)**** (Figure 1 - 3):** if your Test is an unstructured Test, this option will appear. Clicking it will open the [Xray Exploratory App](https://docs.getxray.app/category/xea).
- **Exporting to Cucumber:** if you're executing a Cucumber Test, an option to export the Test as a feature file will appear.
- **Import Execution Results (Figure 1 - 5):** If you already have the Test results, use this action to import the [report](https://getxraydocs.atlassian.net/wiki/pages/viewpage.action?pageId=44566291) files into Xray and update a specific Test Run.
- **Dataset (Figure 1 - 4):** To edit a Test Run dataset, click the *[Dataset](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44566351)* button.

## Execution Status and General Information

The Execution Status (Figure 3 - 7) describes the current progress of the Test. The possible (native) statuses for a Test Run are <span style="color: #808080">**TO DO**</span>, <span style="color: #ffcc00">**EXECUTING**</span>, <span style="color: #ff0000">**FAILED,**</span> and <span style="color: #008000">**PASSED**</span>. You can also create custom statuses in the Xray [Test Statuses Settings](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44566467) global screen.

You can change the execution status directly through this field (Figure 3 - 7). It supports inline editing, and once activated, it will display a set of statuses you can assign to the Test Run. If the option to set the Test Run status manually without executing all Test Steps (or Examples, in the case of Cucumber Tests) is enabled on the [Xray administration screen](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565569), you can set the Test Run Status to any status, independently of the current aggregate status of the Test Steps (or Examples). If this option is disabled, the statuses you can set through this field will be limited to the available transitions based on the current aggregate status of the Steps or Examples.

The status section also contains other relevant fields, such as:

### Timer

![Figure 3 - Execution](media://a5e0fb6d-ab4b-4b69-8e6b-750b04b2f23b)

The timer (Figure 3 - 1) shows the time elapsed since the last time the timer started and the total time logged into this execution.

The timer helps users track the time spent on the execution of the Test. This component will only be visible if the corresponding setting is active in the [Project Settings](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44567037). The timer can be started, paused, and reset manually using the *Play* button (Figure 3 - 2). You can also edit the timer value by clicking it if the *Set the value of the Time Tracker *setting is active in the Project Settings.

The timer will automatically start when the status of the Test Run changes to <span style="color: #ffcc00">EXECUTING</span>, and it will pause when it changes to a final status (i.e., <span style="color: #99cc00">PASSED</span>, <span style="color: #ff0000">FAILED</span>). It will reset when the Test Run changes to <span style="color: #7a869a">TO DO</span>.

There is also a component (Figure 3 - 3) that tracks the time logged for the execution. By clicking it, you can log additional time. Time added in this dialog will be reflected in the work log of the respective Test Execution (Figure 4).

![Figure 4 - Work log](media://ca9e32d7-8992-4711-94fe-1cd0324b5c50)

### Assignee

![Figure 5 - Test execution](media://5a840034-54f6-482f-ab4b-a31715a33972)

The assignee (Figure 5 - 1) is the Xray user assigned to perform the current Test execution. You can change the Test Run assignee directly in the field. It supports inline editing and once activated, you can filter by user and then select the one you want to assign to the Test Run.

After assigning a Test Run, an email notification is sent to the new assignee if the corresponding setting is enabled in the [Global](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565853) or [Project Settings](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44567037).

### Executed By

The last user who changed the status of the current Test Run (Figure 5 - 2).

### Versions

The target release version tested by the current Test execution (Figure 5 - 3).

### Revision

The source code and documentation version used in the current Test execution (Figure 5 - 4).

### Started/Finished On

The date and time of the execution of the current Test (when it started/finished; Figure 5 - 5).

If the dates are configured to be edited, you can edit the **Started On** date by clicking the calendar icon and choosing the date and time. You can check your configurations by going to Jira Administration > Add-ons > <span style="color: #172b4d">[Miscellaneous](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44566331)</span>.

## Findings

The Findings section (Figure 5 - 6) is where the *Defects *(Figure 6 - 1), *Evidence *(Figure 6 - 2), *Comments* (Figure 6 - 3), and *Custom Fields* (Figure 6 - 4) added are displayed (Figure 6).

![Figure 6 - Findings](media://790dfa0d-0dee-4c22-91a7-12c66621498d)

### Defects

*Defects* (Figure 6 - 1) lists the overall and Step defects related to the current execution. It is possible to create new Defect issues (or sub-tasks)** **and/or add existing Defects by clicking the respective option (Figure 6 - 1).

#### Group Defects

*Show Steps Defects*** **is an option that you can see in Manual Tests, that allows you to see overall defects and defects associated with steps in the same panel.

This feature is optional and you can enable/disable it on the respective panel section.

**Example: **when the toggle is on (Figure 7), both defects appear in the panel and a label (Global/Step/Iteration + Step) is shown at the start of the defect line to easily distinguish each of them. When turned off, only the overall defects are shown (Figure 8).

| **Show Steps Defects** |
| --- |
| **Toggle On**<br>![Figure 7 - On](media://274d7410-2378-474d-bd19-28db877a7d50) |
| **Toggle Off**<br>![Figure 8 - Of](media://6cc06bc5-b264-4792-b2db-3d4538873efd) |

### Evidence

Evidence (Figure 6 - 2) lists all the attachments related to the current execution. Clicking the + icon and then the *Add Evidence* option leads to the opening of a modal where you can upload [attachments](https://getxraydocs.atlassian.net/wiki/display/XRAYCLOUD/Storage) (external files).

#### Group Evidence

*Show Steps Evidence*** **is an option that you can see in Manual Tests, which allows you to see overall evidence and evidence associated with steps in the same panel. This feature is optional, and you can enable/disable it on the respective panel section.

**Example: **when the toggle is on (Figure 9), all evidence appears in the panel, and a label (Global/Step/Iteration + Step) is shown at the start of the evidence line to easily distinguish each of them. When turned off, only the overall evidence is shown (Figure 10).

| **Show Steps Evidence** |
| --- |
| **Toggle On**<br>![Figure 9 - On](media://78dcf0c8-45ef-452f-9622-1790c7f8cadd) |
| **Toggle Off**<br>![Figure 10 - Off](media://d7bfc7e3-2ab5-4e5b-bb3e-531c42d65528) |

### Custom Fields

You define additional custom fields (Figure 6 - 3) for Test Runs. These fields can be useful to add extra information to Test Runs, usually only available when or after executing Tests.

Test Run custom fields can be configured by project and by Test Type. Therefore, these settings will not affect other projects within your Jira instance. For instance, it is possible to have custom fields just for Manual Tests within a project.

If there are any custom fields defined for the scope of the Test Run, they will appear in the *Custom Fields* section (Figure 6 - 3). 

It is also possible to make custom fields mandatory. If this is the case, users will not be able to set a final status on the Test Run if there is any required custom field that is not populated.

![Figure 11 - Custom fields](media://ad84af71-53f6-4e9e-af37-35c4930ec6f9)

### Comment

The *Comment* field (Figure 6 - 4) is inline editable, so you can insert comments about the current execution without reloading the page.

It supports the [Jira markup wiki language](https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all).

## Test Details Section

![Figure 12 - Test execution](media://609ecfa2-e8be-476b-a723-0cb153ea2e09)

The Test Details section (Figure 12 - 13) includes some fields present on the Test Issue. It often contains useful information for testers to execute the Test.

### Test Description

This section (Figure 12 - 13; Figure 13) includes the current Test Issue description. It often contains useful information for testers to execute the Test.

This field supports the [Jira markup wiki language](https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all).

![Figure 13 - Test description](media://c1dbd986-d06c-4542-9c4d-5d5f56d71697)

### Test Issue Attachments

<span style="color: #172b4d">This section shows all attachments associated with the Test (Figure 14). </span>

![Figure 14 - Attachments](media://35df1fbd-291f-4fd2-96e9-3a129de60dbe)

### Test Issue Links

This section (Figure 15) shows all links associated with the Test. 

![Figure 15 - Links](media://7c9f5211-2e3a-492c-aae4-ffcc0a9015ac)

### Parameters

This field (Figure 16) shows the [parameters' values](https://getxraydocs.atlassian.net/wiki/display/XRAYCLOUD/Parameterized+Tests) defined in the dataset when there is only a single row in it<span style="color: #172b4d">.</span>

![Figure 16 - Parameters](media://c8ee524d-8f7b-4cc8-a336-a3e43bc93eb5)

### Preconditions

This field (Figure 17) shows the Preconditions Issues associated with the current Test.

![Figure 17 - Preconditions](media://04f18643-4939-43b3-94f7-6a0fa1b3170f)

### Steps/Definition/Scenario or Scenario Outline

Within that section, you will find the Test script to execute. Depending on the Test Type, this section can display *[Steps](https://getxraydocs.atlassian.net/wiki/display/XRAYCLOUD/Test+Steps)* (for manual Tests; Figure 18 - 1), *Definition*** **(for unstructured Tests), and *Scenario* or Scenario Outline (for [Gherkin](https://getxraydocs.atlassian.net/wiki/display/XRAYCLOUD/Gherkin) scenarios).

![Figure 18 - Test execution](media://a3c9eba4-027b-44a5-a786-47588ba9ddd5)

#### Manual Test Step Results Table

A** Manual Test** execution screen (Figure 19) contains the **Test Steps**, with the Action, attachments and all the other configured fields to be used as a reference while testing. The Test Steps field configuration used is the one defined in the Test Run's Test project.

![Figure 19 - Test steps](media://bf3cf4d5-0147-4dcb-af3e-4bc0b4bd8946)

By clicking each step, the following fields become editable:

- <span style="color: #172b4d">The </span>*Actual Result*<span style="color: #172b4d"> field (Figure 19 - 6), which contains the actual result of the execution of the step:</span>
  - This field can be edited using a WYSIWYG markdown editor.
  - It's possible to refer to an Evidence previously added to any Step or Global execution.
- The *Comment* field (Figure 19 - 2) contains notes about the corresponding step.
- The *Defects* field (Figure 19 - 3) contains any defect associated with the corresponding step. It is also possible to input new defects by clicking:
  - *Create Defect* to create a new defect.
  - *Create Sub-Defect* to create a new sub-defect (sub-task).
  - *Add Defects* to add an already existing defect.
- The *Evidence* field (Figure 19 - 4) contains any attachments associated with the corresponding step. It is also possible to input new attachments by clicking on the **+** button, which opens the Add Evidence** **modal.
- The *Status *(Figure 19 - 5) field contains the current step testing status. This can be changed by clicking any of the statuses next to the Step Status. Changing the Status on each Step will affect the *Execution Status* field on the Execution Screen (Figure 18 - 2).

#### Gherkin Tests

Gherkin Tests always display the Test scenario on the execution page. Usually, these Tests are automated and their result can be imported into Xray. However, it is also possible to execute these Tests manually by setting the overall result of the Test Run, or by setting the result of each example (in the case of scenario outlines - Figure 20).

![Figure 20 - Scenario outlines](media://243081c8-4332-41c7-a861-bd82bf1a20be)

**Examples**

A **Scenario Outline **(Figure 20)** **contains a table of examples that define several inputs and outputs for the given scenario. Each example is, therefore, a set of values that will be replaced in the scenario.

The examples section details these examples, containing an overall status bar in the header and a table with all the examples below. Each example can have the status: <span style="color: #008000">PASSED</span>, <span style="color: #ff0000">FAILED</span>, <span style="color: #ffcc00">EXECUTING,</span> or <span style="color: #7a869a">TODO </span><span style="color: #000000">(Figure 21)</span>. 

A scenario outline Test is <span style="color: #008000">PASSED</span> only if all examples have passed.

A scenario outline Test is <span style="color: #ff0000">FAIL</span> if at least one of the examples has failed.

A scenario outline Test is <span style="color: #808080">TODO</span> if at least one of the examples did not run, and all the other examples are <span style="color: #008000">PASSED</span> or <span style="color: #7a869a">TODO</span>.

![Figure 21 - Status](media://b090371b-7e54-4291-a8cf-7b178a3d7340)

#### Unstructured Tests

Unstructured Tests only contain the definition** **field on the Test Details (Figure 18). This field can specify a Test script, an ID to an external (automated) Test case, or an Exploratory Test charter. Similar to Gherkin Tests, most unstructured Test results will be imported or set by another tool. However, it is also possible to set the status of unstructured Tests manually.

![Figure 22 - Unstructured tests](media://8db42ac8-25d4-45f9-b2c7-6acc7d84b0c4)

### <span style="color: #000000">Iterations</span>

<span style="color: #172b4d">When this is a Test run of a data-driven Test, this field shows all the iterations corresponding to the rows of the dataset closest to the Test Run. For each iteration, the Preconditions and Steps appear with the expected </span><span style="color: #172b4d">[parameter values](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565547)</span><span style="color: #172b4d"> for it.</span>

All operations for Test Steps are also available within an iteration, namely adding defects, evidence, and the actual result.

This section also features a progress bar displaying the status of all iterations.

#### Filtering Iterations

It is also possible to filter the iterations by status. A filter button is provided next to the iterations progress bar (Figure 23 - 1). Clicking this button will open a panel with all the available statuses. Choose one or more statuses and press *Apply*.

![Figure 23 - Filtering](media://2b0215cc-1ca8-4964-8a2e-4c66cbb7e751)

#### Status Calculation

When a Step status is changed, the iteration status will be updated automatically, according to the Step statuses, and, in turn, the overall Test status will also be updated based on all iteration statuses (Figure 23).

### Automated Results

Xray supports the import of multiple execution results for the same Test Run. Multiple executions for the same Test Run specify different results for different contexts/environments. Multiple executions are only supported for Automated Tests. Manual Tests do not have this concept yet.

When a Test Run contains multiple executions imported from external sources like [Calabash](https://github.com/calabash) and [Xamarin Test Cloud](https://testcloud.xamarin.com/), these executions are presented in a *Results* section (Figure 24) on the execution page.

![Figure 24 - Results](media://31a1f36c-c2e7-4801-9c3d-73d635d24182)


This section contains a Table with all executions for the same Test Run. The table has the following columns:

- **Context (Figure 24 - 1): **an execution context name (in the case of Xamarin Test Cloud results, the mobile device, and the operating system version).
- **Error Message (Figure 24 - 2): **a possible error message if the result has failed.
- **Duration (Figure 24 - 3): **the complete duration of an execution result.
- **Status (Figure 24 - 4):** the execution results status.

## <span style="color: #000000">Activity</span>

The Activity field (Figure 25 - 1) lists all the activities related to the current execution. 

![Figure 25 - Test execution](media://04a92d41-a337-4ac7-90ce-f78ffd443c6b)

For data-driven Tests, the iteration number will appear in the activity list (Figure 25 - 15; Figure 26).

![Figure 26 - Iteration](media://b551f9aa-7576-4382-9b94-f293219a45be)

# Operations

## Updating the Definition of the Test After the Execution Started

When a Test definition has changed, a modal will appear at the top of the Execution page informing you that the current execution is obsolete (Figure 27). You will be prompted with two buttons: *Reset* (Figure 27 - 1) and *Merge* (Figure 27 - 2). 

![Figure 27 - Update](media://e5a8490a-dd9e-4b9f-9c7c-7a810eb1a335)

### Reset

You can choose to reset the Execution or keep it for the historical record. If you reset the execution, all information previously saved (status, evidence, defects) will be erased.<span style="color: #ff0000"> </span>

### Merge

You can choose to merge the new Test definition into the current status of execution. This will keep Steps that weren't changed along with the associated results/comments/evidence. It will also load new Test Steps (moved, erased, or created), Preconditions, or attachment definitions. This will always force a recalculation of the Test Run Status. For instance, if the current Test Run Status is <span style="color: #ff0000">FAILED</span> because of a Step and this step is removed from the Test, if you click merge, then the Test Run Status will change to whatever the value combination of the other Steps returns.


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