---
title: "Document Generator Template: Test Execution"
canonical: "https://docs.getxray.app/space/XRAYCLOUD/44577044/Document%20Generator%20Template%3A%20Test%20Execution"
format: markdown
---
<details>
<summary>Table of Contents</summary>

> Macro (toc)
</details>

# Introduction

The [Test Execution](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565117) report enables you to extract details of a Test Execution, such as the [Tests](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565156) that are part of it, [Defects, Requirements](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565860), and iterations details so that you can generate a document report focusing on what matters the most for your team, or even share it with someone else who hasn't access to Jira.

Possible usage scenarios:

- See all the Requirements covered by the Tests in the Test Execution.
- See all the defects linked to the Tests in this Test Execution.
- See an overall status summary of the Test Execution.
- Check specific details of a [Test Run](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565109) (like evidence, attachments, assignees, etc.).

## Output Example(s)

Figures 1, 2, 3, 4, 5, and 6 show examples of the sections you can find in this report.

![Figure 1 - Report](media://b181dba8-ada7-4727-96ae-14a603d3df06)

![Figure 2 - Report](media://af723db2-ba86-4ba8-830b-01ebd9cde6c8)

![Figure 3 - Report](media://b9a45df8-54ee-47a9-ae76-cef2679ee342)

![Figure 4 - Report](media://89292be9-8308-43d7-b9ea-547f3dd5fab7)


![Figure 5 - Report](media://012e24a9-aeb5-4c6c-89df-032f3d975c17)

![Figure 6 - Report.png](media://496b3964-e284-4770-925b-44e8ba8afabc)

# Operations

## Using the Report

### Access/Usage Examples

#### From the Issue Search/Navigator Screen

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

### From the [Test Repository](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565166)/[Test Plan Board](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565285)

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> Go to your Project, click *More* (Figure 10 - 1), and then select *Testing Board* (Figure 10 - 2).
> 
> ![Figure 10 - Testing Board](media://f94b67a7-790f-4d15-895a-af0690e0fc51)
> 
> > Macro (rw-step)
> 
> A new screen will open (Figure 11). There, click the menu icon (Figure 11 - 1).
> 
> ![FIgure 11 - Menu](media://d6ea7856-974b-42ce-b093-bcb76bb347d4)
> 
> > Macro (rw-step)
> 
> Click the *Test Repository* option (Figure 12 - 1).
> 
> ![Figure 12 - Test repository](media://ce2a6e6b-ba61-411c-b90b-338b3351ad73)
> 
> > Macro (rw-step)
> 
> On the Test Repository (Figure 13), select the Test/s required for the exportation by choosing a folder, sub-folder, or selecting the Tests in the list. A box with options will appear: select *Document Generator* (Figure 11 - 2).
> 
> A modal will open (Figure 14).
> 
> ![Figure 13 - Tests](media://2492770a-e37f-4dda-8de9-87dc6ac10b8e)
> 
> > Macro (rw-step)
> 
> In the modal (Figure 14), select *Test Execution Report* in the *Template* field (Figure 14 - 1), and the *Output Format* (Figure 14 - 2).
> 
> When you're finished, click *Export* (Figure 14 - 3).
> 
> ![Figure 14 - Export](media://a6bb8837-b02a-4806-97bb-89f3eecd75bc)
> 
> > Macro (rw-step)
> 
> The export operation will start (Figure 13). Once it's finished, click the *Download* button (Figure 13 - 1). You will get the file immediately on your machine.
> 
> ![Figure 15 - Download](media://3755c8ca-e45d-4aeb-b6e1-96b1ed037c10)
> 
> > ℹ️ The process is the same for exporting [Test Plans](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565153). To access Test Plans, on the *Test Boarding* (Figure 16), select *Test Plans* (Figure 16 - 1).
> > ℹ️ 
> > ℹ️ ![Figure 16 - Testing Board](media://7186f8fd-cf66-460b-83ee-f44e5a80eb50)


> ℹ️ **Learn More**
> ℹ️ 
> ℹ️ General information about all the existing places available to export from, and how to perform it, is available on the [Document Generator Template: Test Execution](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44577044) page.

### Source Data

This report is applicable to one Test Execution Issue.

### Output Format

The standard output format is DOCX, so you can open it in Microsoft Word, Google Docs, and other tools compatible with this format.

### Report Assumptions

The report/Template has a set of assumptions that you have to make sure your Jira/Xray environment complies with:

- Issue Types having these names: "Test", "Test Set", "Test Plan", "Test Execution".

If any of these assumptions are not met, you need to update the Template accordingly.

## Understanding the Report

The Test Execution report shows detailed information about the Test Execution provided.

### Layout

The report is composed of several sections. Two major sections are available: *Introduction* and *[Test Runs](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44577044)* details.

By default, all the details of the Test Run will be rendered; you can change this behavior on the Template (more info ahead).

#### Introduction

This section is divided into six sub-sections to provide an overview of the [Document Generator Template: Test Execution](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44577044) you have just exported:

1. Document overview.
2. Test Execution details.
3. Requirements covered by the Tests in this Test Execution.
4. Overall Execution status.
5. Defects.
6. Test Runs.

Each of these sections is explained below.

##### Document Overview

Brief description of what you will find in this report and how it was generated.

##### Test Execution Details

In this section, we are extracting the Test Plan key in the header and showing the *Begin* and *End Date* (formatted as demonstrated below), the *Summary,* and the *Description* present in the Test Plan.

| **Field** | **Description** | **Sample Code** |
| --- | --- | --- |
| Description | Description of the Test Execution (as this field accepts wiki markup, we will use "wiki:" in the code to be interpreted by the document) | *${wiki:Description}* |
| Begin Date | Timestamp of the Begin Date field present in the Test Execution (with proper format) | *${dateformat("dd-MM-yyyy HH:mm:ss"):Begin Date}* |
| End Date | Timestamp of the End Date field present in the Test Execution (with proper format) | *${dateformat("dd-MM-yyyy HH:mm:ss"):End Date}* |
| Revision | Revision of the Test Execution | *${Revision}* |
| Test Environments | Test Environments associated with this Test Execution | *${TestEnvironments}* |
| Test Plan | Test Plan associated with this Test Execution (if any) | *#{for testPlans}${TestPlans[n].Key} - ${TestPlans[n].Summary} #{end}* |

The output will have the following information (Figure 15). Notice that the *Description* field supports wiki markup (we are using "*wiki:*" keyword so that it is correctly interpreted).

![Figure 17 - Test details](media://680f45e3-366b-4475-a6cc-5a814d179cec)

##### Requirements Covered by the Tests in this Test Execution

In this section, there's an overview of all the Requirements that are covered by Tests in this Test Plan. We extract the *Key*, *Summary, Workflow,* and the *Test Status* Status removing all the repeated entries.

In the Server version, there's a query that fetches the Requirements linked with a Test: *testRequirements('${Tests[n].Key}')*

| **Field** | **Description** | **Sample Code** |
| --- | --- | --- |
| Key | Key of the Requirement (in this case we are adding it as a link) | *@{title=${Tests[n].Links[k].Key}|href=${BaseURL}/browse/${Tests[n].Links[k].Key}****}*** |
| Summary | Summary of the Requirement | *${Tests[n].Links[k].Summary}* |
| Workflow Status | Workflow Status of the Requirement | *${Tests[n].Links[k].Status}* |

The Requirements are listed in a table with the information explained above (Figure 16).

![Figure 18 - Requirements](media://6134fec0-b100-448a-9e66-9ba7b89626d3)

##### Overall Execution Status

As the name suggests, there's an overview of the executions of the Tests in this Test Execution. Here you have information about how many Test Runs you have in this Test Execution and what are the statuses of their executions.

To obtain this information, we are using:

| **Field** | **Description** | **Sample Code** |
| --- | --- | --- |
| TestsRunsCount | The total number of Test Runs in this Test Execution | *${TestsCount}* |
| #TestsRuns | To extract the count of the overall execution status per each *<status>* (*TO DO, EXECUTING, PASSED, FAILED, ABORTED*) | *${Overall Execution Status.<status>.Count}* |
| Percentage | To extract the percentage of the overall execution status per each *<status>* (*TO DO, EXECUTING, PASSED, FAILED, ABORTED*) | *${Overall Execution Status.<status>.Percentage}* |

This will produce the following output (Figure 17):

![Figure 19 - Output](media://d0331259-d03c-4451-b633-da7603eabe38)

##### Defects

In this section, we are listing all the Defects found that are associated with this Test Execution. We consider Defects associated with Test Runs, defects in Test Steps, or Defects found during the iterations. 

We do not print duplicates.

| **Field** | **Description** | **Sample Code** |
| --- | --- | --- |
| Key | Key of the Defect | - TestRun
  - *@{title=${TestRuns[n].ExecutionDefects[d].Key}|href=${BaseURL}/browse/${TestRuns[n].ExecutionDefects[d].Key}}*
- TestSteps
  - *@{title=${TestRuns[n].TestSteps[j].Defects[m].Key}|href=${BaseURL}/browse/${TestRuns[n].TestSteps[j].Defects[m].Key}}*
- Iteration TestSteps
  - *@{title=${TestRuns[n].Iterations[it].TestSteps[r].Defects[dc].Key}|href=${BaseURL}/browse/${TestRuns[n].Iterations[it].TestSteps[r].Defects[dc].Key}}* |
| Summary | Summary of the Defect | - TestRun
  - *${TestRuns[n].ExecutionDefects[d].Summary}*
- TestSteps
  - *${TestRuns[n].TestSteps[j].Defects[m].Summary}*
- Iteration TestSteps
  - *${TestRuns[n].Iterations[it].TestSteps[r].Defects[dc].Summary}* |
| Priority | Priority of the Defect | - TestRun
  - *${TestRuns[n].ExecutionDefects[d].Priority}*
- TestSteps
  - *${TestRuns[n].TestSteps[j].Defects[m].Priority}*
- Iteration TestSteps
  - *${TestRuns[n].Iterations[it].TestSteps[r].Defects[dc].Priority}* |

The Defects appear in the document as a table with information regarding the Defects found during the executions of the Test Execution (Figure 18).

![Figure 20 - Defects](media://a9f7aa92-4ff3-4397-864e-79b20f2fddac)

#### Test Runs

In this section, there's a table with information regarding the Test Runs in this Test Execution. You can find the following information about each Test Run:

| **Field** | **Description** | **Sample Code** |
| --- | --- | --- |
| Key | Key of the Test Run | *${TestRuns[n].Key}* |
| Summary | The Summary of the Test Run | *${wiki:TestRuns[n].Summary}* |
| Test Type | The type of Test that was executed in this Test Run | *${TestRuns[n].TestType}* |
| #Req | Number of Requirements associated with this Test Run | ${set(count, 0)}<br>#{for t=TestsCount}<br>#{if (%{'${Tests[t].Key}'.equals('${TestRuns[n].Key}')})}<br>#{for j=Tests[t].LinksCount}<br>#{if (%{'${Tests[t].Links[j].LinkType}'.equals('tests')})}<br>${set(count,%{${count}+1})}<br>#{end}<br>#{end}<br>#{end}<br>#{end}<br>${count} |
| #Def | Calculation of the number of Defects associated with this Test Run | *%{var total=${TestRuns[n].ExecutionDefectsCount} + ${TestRuns[n].TestStepsDefectsCount};  var total2=’’+total;var totalParts= total2.split(‘.’); totalParts[0];}* |
| Test Sets | Test Set Key (if this Test Run was part of a Test Set) | *${TestRuns[n].TestSets[ts].Key}* |
| Assignee | Full name of the Assignee | *${fullname:TestRuns[n].AssigneeId}* |
| Status | Status of the Test Run | *${TestRuns[n].Execution Status}* |

This information is presented in a table, as you can see below (Figure 21):

![Figure 21 - Table](media://5b4b3193-98b7-4b64-89a9-db664200f7ac)

<span style="color: #172b4d">Some particularities to highlight a different behavior about the code necessary to show the Tests Runs sectio</span>n: usage of *${fullname:Tests[n].AssigneeId}* (this allows you to fetch the full name of the assignee instead of the key associated with it).

### Test Run Details

This section gathers all the information related to each Test Run of each Test in the Test Execution, with all the possible details.

It is composed of several sub-sections that will be filled with information if it is available, or will be filled with a message showing that no information is available.

#### Test Executions Summary

This section has a table with information regarding each Test Run in this Test Execution (and will repeat these sections for each Test Run).

The information is presented as a table with the following fields:

| **Field** | **Description** | **Sample Code** |
| --- | --- | --- |
| *Execution status* | Execution Status of the Test Run | *${TestRuns[n].Execution Status}* |
| *Assignee* | Full Name of the Assignee of the Test Run | *${fullname:TestRuns[n].AssigneeId}* |
| *Executed By* | Full Name of the entity that has executed this Test Run | *${fullname:TestRuns[n].Executed By}* |
| *Started On* | Timestamp of the Started Date from the TestRun | *${dateformat('dd-MM-yyyy HH:mm:ss'):TestRuns[n].Started On}* |
| *Finished On* | Timestamp of the Finished Date from the TestRun | *${dateformat('dd-MM-yyyy HH:mm:ss'):TestRuns[n].Finished On}* |
| Versions | Fix Version field associated with the TestRun | *${TestRuns[n].FixVersions}* |
| Revision | Revision assigned to the TestRun | *${TestRuns[n].Revision}* |

All of these fields have code to handle empty fields. The resulting table looks like the one below (Figure 22).

![Figure 22 - Table](media://f0f64c61-43a0-4078-a1f1-d1fcdbcbe55c)

##### Execution Defects

If any Defects were found and associated globally with a Test Run, they will appear here in the form of a table with the following fields:

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| *Key* | Jira Key of the Defect in the form of a link | *@{title=${TestRuns[n].ExecutionDefects[d].Key}|href=${BaseURL}/browse/${TestRuns[n].ExecutionDefects[d].Key}}* |
| *Summary* | Summary of the Defect | *${wiki:TestRuns[n].ExecutionDefects[d].Summary}* |
| *Priority* | Priority associated with the defect | *${TestRuns[n].ExecutionDefects[d].Priority}* |

The table will be similar to the one below (Figure 23).

![Figure 23 - Defects](media://b7f5a45b-5a55-4b5e-a147-fb360a02bc67)

##### Execution Evidences

If any Evidence was attached to the Test Run, we are showing it in the table with the *File Name*.

To obtain that information, we have used the following code:

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| *File Name* | The File Name of the Evidence attached to the Test Run | *@{title=${TestRuns[n].ExecutionEvidences[d].Name}|href=${TestRuns[n].ExecutionEvidences[d].FileURL}}* |
| Author | Author of the Evidence | *${TestRuns[n].ExecutionEvidences[d].Author}* |
| File Size | File Size of the Evidence in bytes | *${TestRuns[n].ExecutionEvidences[d].Size}* |
| *Evidence* | The Evidence attached to the Execution | *!{${TestRuns[n].ExecutionEvidences[d].Evidence|maxwidth=100}}* |

The table in case of Evidence is of the Type image will have the following aspect (Figure 24):

![Figure 24 - Evidence](media://996ba19d-51b3-45ed-b5e1-003acfec3d4a)

##### Comment

The comment associated with the Test Run (*${wiki:TestRuns[n].Comment}*)

##### Test Description

The description of the TestRun (*${wiki:TestRuns[n].Description}*)

##### Test Issue Attachments

This section only appears if you have any attachments associated with the Test Run.

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| File Name | File Name of the Attachment | *@{title=${TestRuns[n].Attachments[a].Name}|href=${TestRuns[n].Attachments[a].FileURL}}* |
| Author | The Author of the attachment | *${fullname:TestRuns[n].Attachments[a].Author}* |
| File Size | File Size of the attachments in bytes | *${TestRuns[n].Attachments[a].Size}* |

This appears in the document in a table form (Figure 25):

![Figure 25 - Attachments](media://328265fd-f571-4ac4-b89b-cb8865c4ffb0)

##### Preconditions

This section only appears if you have a [Precondition](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565159) associated with the TestRun.

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| Key | Key of the Precondition | *@{title=${TestRuns[n].PreConditions[c].Key}|href=${BaseURL}/browse/${TestRuns[n].PreConditions[c].Key}}* |
| Definition | Definition field present in the Precondition | *${wiki:TestRuns[n].PreConditions[l].PreCondition.Definition}* |

A sub-section will appear with the Precondition definitions (Figure 26).

![Figure 26 - Precondition](media://d36087d4-a078-4bc3-bd1a-df558f543c18)

##### Parameters

This section lists the existing Parameters of the Test Run (we are iterating through the Parameters of the TestRun with: *#{for m=TestRuns[n].ParametersCount})*.

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| Name | Key of the parameter | *${TestRuns[n].Parameters[m].Key}* |
| Value | Value of the parameter | *${TestRuns[n].Parameters[m].Value}* |

It will list the Key and the Value of each parameter in a table (Figure 25).

![Figure 27 - Parameters](media://9e0618cf-bad8-48ea-97f6-1515a8e5def6)

##### Iterations

This section uses a sentence to show how many interactions you will go into more detail in the next sections.

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| Iterations | The iterations count of the Test Run | *${TestRuns[n].IterationsCount}* |

A sentence is added to the document with this information (Figure 26).

![Figure 28 - Iterations](media://ff43e673-5f0f-48d7-8ea9-23f901a03195)

##### Iteration Overall Execution Status

To obtain the overall execution status of the iteration we use two variables:

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| List of Statuses | Show the List of Statuses | *${TestRuns[n].IterationsOverallExecutionStatus}* |
| TO DO<br>EXECUTING<br>PASS<br>FAIL<br>ABORTED | Overall Execution Status per Status | *${TestRuns[n].IterationsOverallExecutionStatus.TO DO}*<br>*${TestRuns[n].IterationsOverallExecutionStatus.EXECUTING}*<br>*${TestRuns[n].IterationsOverallExecutionStatus.PASSED}*<br>*${TestRuns[n].IterationsOverallExecutionStatus.FAILED}*<br>*${TestRuns[n].IterationsOverallExecutionStatus.ABORTED}* |

The above code will produce the below table (Figure 29).

![Figure 29 - Table](media://68c8052c-0ade-4d1e-83e8-27eb382db145)

##### Test Run Details

In this section, we are showing the Test Run details with the Name, Status, and Parameters.

We extract that information using the following fields:

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| Iteration Name | Name of the iteration | *${TestRuns[n].Iterations[m].Name}* |
| Status | Status of the iteration | *${TestRuns[n].Iterations[m].Status}* |
| Total Parameters | Total number of parameters | *${TestRuns[n].Iterations[m].ParametersCount}* |
| Parameters | Lists all parameters in the form of Key=Value | *${TestRuns[n].Iterations[m].Parameters}* |

This section will have the following appearance (Figure 30):

![Figure 30 - Table](media://ee85058b-36f7-4b8f-8d51-5aa20ceaa7f4)

##### Iteration Precondition Definition

If a Precondition is present, we will use the following fields to extract that information:

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| Key | Iteration precondition key | *${TestRuns[n].Iterations[m].PreConditions[l].Key}* |
| Definition | Iteration precondition definition | *${wiki:TestRuns[n].Iterations[m].PreConditions[l].Conditions}* |

This will produce an entry like the one below (Figure 31):

![Figure 31 - Table](media://4be13759-e4c8-4612-8764-2c83e53d772c)

##### Iteration Parameters Details

For that given Iteration, we are listing the parameters used; that information is extracted with the following fields:

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| Name | Parameter Key | *${TestRuns[n].Iterations[m].Parameters[l].Key}* |
| Value | Parameter Value | *${TestRuns[n].Iterations[m].Parameters[l].Value}* |

It generates a table of the following form (Figure 32):

![Figure 32 - Table](media://c76f715b-83f4-4fa7-94f8-ead59105e754)

##### Iteration Test Step Details

In this section, we are listing the details of an iteration, we are listing each Step present with details, and the code we use for that purpose:

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| Step | The Step Number | *${TestRuns[n].Iterations[m].TestSteps[r].StepNumber}* |
| Action | Action defined in the Test Step | *${wiki:TestRuns[n].Iterations[m].TestSteps[r].Action}* |
| Data | Data defined in the Test Step | *${wiki:TestRuns[n].Iterations[m].TestSteps[r].Data}* |
| Expected Result | Expected Result defined in the Test Step | *${wiki:TestRuns[n].Iterations[m].TestSteps[r].ExpectedResult}* |
| Attachments | Attachments present in each Test Step (showing the FileURL and a screenshot in case of the Attachment being an image) | *@{title=${TestRuns[n].Iterations[m].TestSteps[r].Attachments[sa].Name}|href=${TestRuns[n].Iterations[m].TestSteps[r].Attachments[sa].FileURL}}*<br>*!{${TestRuns[n].Iterations[m].TestSteps[r].Attachments[sa].Attachment|maxwidth=100}}* |
| Comment | Comment | *${wiki:TestRuns[n].Iterations[m].TestSteps[r].Comment}* |
| Defects | Defects associated with this Iteration | *@{title=${TestRuns[n].Iterations[m].TestSteps[r].Defects[dc].Key}|href=${BaseURL}/browse/${TestRuns[n].Iterations[m].TestSteps[r].Defects[dc].Key}}* |
| Evidence | FileURL and screenshot (if it is an image) of the Evidence | *@{title=${TestRuns[n].Iterations[m].TestSteps[r].Evidences[e].Name}|href=${TestRuns[n].Iterations[m].TestSteps[r].Evidences[e].FileURL}} by ${TestRuns[n].Iterations[m].TestSteps[r].Evidences[e].Author} - ${TestRuns[n].Iterations[m].TestSteps[r].Evidences[e].Size}*<br>*!${TestRuns[n].Iterations[m].TestSteps[r].Evidences[e].Evidence|maxwidth=100}* |
| Status | Test Step Status | *${TestRuns[n].Iterations[m].TestSteps[r].Status}* |

The above information is gathered in a table like the one below (Figure 31):

![Figure 33 - Table](media://4204d34c-b256-49d6-957e-24a8b5200ed0)

##### Test Details

This section shows the Test details. For that, we are considering the different possible Tests we can have in Xray: Generic, Manual, and Cucumber. For each Type we will fetch different information.

It may seem similar to the Iteration Test Step Details section. However, in this section, we will show the Test details (not instantiated in each Iteration like the previous section).

| **Type** | **Key** | **Description** | **Sample Code** | **Output** |
| --- | --- | --- | --- | --- |
| Generic | Test Type | Test Type field | *${TestRuns[n].Test Type}* | ![Output1](media://5843a105-ae4c-483e-83e8-b6000bfadf83) |
| Specification | Definition of the Generic Test | *${TestRuns[n].Generic Test Definition}* |
| Cucumber | Test Type | Test Type field | *${TestRuns[n].Test Type}* | ![Output2](media://9d0d9af4-be80-4295-b08b-e0d112834f46) |
| Gherkin Specification | Gherkin specification of the Test | *${TestRuns[n].Cucumber Scenario}* |
| Manual | Step | Step Number | *${TestRuns[a].TestSteps[r].StepNumber}* | ![Output3](media://274bca7a-82de-4c42-8db4-86476d8dda06) |
| Action | Action of the Test Step | *${TestRuns[a].TestSteps[r].Action}* |
| Data | Data of the Test Step | *${TestRuns[a].TestSteps[r].Data}* |
| Expected Result | Expected Result of the Test Step | *${TestRuns[a].TestSteps[r].ExpectedResult}* |
| Attachments | Attachment of the Test Step | *${TestRuns[a].TestSteps[r].Attachments[sa].FileURL}*<br>*!{${TestRuns[n].TestSteps[r].Attachments[sa].Attachment}|width=100}* |
| Comment | Comment on the Test Step | *${wiki:TestRuns[a].TestSteps[r].Comment}* |
| Defects | Defects associated with the Test Step | *${TestRuns[a].TestSteps[r].Defects[dc].Key}* |
| Evidence | Evidence with the Test Step | *${TestRuns[a].TestSteps[r].Evidences[e].FileURL}}*<br>*!${TestRuns[a].TestSteps[r].Evidences[e].Evidence|maxwidth=100}* |
| Status | Status of the Test Step | *${TestRuns[a].TestSteps[r].Status}* |

##### Requirements Linked with this Test

For each Test, we are listing the Requirements linked:

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| Requirement Key | Key of the Requirement | *${Tests[t].Links[j].Key}* |
| Requirement Summary | Summary of the Requirement | *${Tests[t].Links[j].Summary}* |
| Workflow Status | Workflow status of the Requirement | *${Tests[t].Links[j].Status}* |

This section presents a table with that information, like the one below (Figure 34):

![Figure 34 - Table](media://a7c6802f-1211-48f6-86fd-2d210888c60a)

### Appendix A: Approval

This section is added for the cases where you need to have a signature validating the document (Figure 35).

![Figure 35 - Table](media://ae5b6413-9d46-4d8f-9422-803690325f6b)

## Customizing the Report

### Sections that Can be Hidden or Shown

The report has some variables/flags that can be used to show or hide some sections whose logic is already implemented in the Template.

These variables are defined at the top of each sheet, at the report Template; the variables are scoped just to the current sheet.

On the Template, use one of these values for flag type of variables:

- **0**: to hide a section.
- **1**: to show a section.

The format for other types of variables is detailed ahead.

> ℹ️ **Example of setting a variable to, in this case, render information on the section "Test Executions"**
> ℹ️ 
> ℹ️ ${set(showTestRunDetails, 1)}

|  |
| --- |
| *${set(showTestRunIterations, 0)}* |

### <span style="color: #000000">Adding or Removing Information to/from the Report</span>

<span style="color: #000000">Since this report is a document with different sections, if some sections are not relevant to you, you should be able to simply delete them. Make sure that no temporary variables are created in that section that are used in other subsequent sections or if any all conditional blocks are properly closed.</span>

<span style="color: #000000">To add additional information, usually, we're thinking of adding fields of:</span>

- <span style="color: #000000">The Test Execution itself.</span>
- <span style="color: #000000">The Tests associated with the Test Execution.</span>
- <span style="color: #000000">The Test Runs associated with the Test Execution.</span>

<span style="color: #000000">Eventually, also fields of:</span>

- <span style="color: #000000">The Test Plan (if associated with any).</span>
- <span style="color: #000000">The covered Issue(s) associated with the Test that is associated with the Test Execution.</span>

<span style="color: #000000">The latter may be harder to implement, so we won't consider them here.</span>

#### <span style="color: #000000">Adding a Field from the Related Test Issue </span>

<span style="color: #000000">Let's say you have a </span><span style="color: #000000">*Severity*</span><span style="color: #000000"> field on the Defect that is connected to the Test Execution, and that you want to show on the report.</span>

<span style="color: #000000">You can copy the column </span><span style="color: #000000">*Comment*</span><span style="color: #000000"> from the </span><span style="color: #000000">*Tests Details*</span><span style="color: #000000"> section and adapt it:</span>

1. <span style="color: #000000">Insert a new column in the table.</span>
2. <span style="color: #000000">In the "Tests Details" section:</span>
  1. <span style="color: #000000">Copy </span><span style="color: #000000">*Comment*</span><span style="color: #000000"> (i.e., insert a column next to it and copy the values from the existing </span><span style="color: #000000">*Comment*</span><span style="color: #000000"> column).</span>
  2. <span style="color: #000000">Change </span>`${wiki:TestRuns[n].TestSteps[r].Comment}`<span style="color: #000000"> to </span>`${TestRuns[n].TestSteps[r].Severity}`

## Performance

Performance can be impacted by the information that is rendered and by how that information is collected/processed.

The number of Test Runs and Tests, depending on the scenarios, can be considerably high, especially with CI/CD. As this report sums up a lot of information, please use it wisely.

Data-driven Tests may also add an overhead, as iterations need to be individually processed, for collecting all the reported/linked Defects for example.

> ℹ️ **Tips**
> ℹ️ 
> ℹ️ - Use the variables/flags to adjust sections or the Test Plan that will be processed/shown in the report; more info in the *Customizing the Report* section.
> ℹ️ - Limit the number of input Issues; in [Xporter](https://docs.getxporter.app/), there's a global setting for this purpose.

# Limitations

- Test Execution comments are not formatted.
- Gherkin scenario outlines are not considered data-driven (i.e., only one Test Run will appear).


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