---
title: "Document Generator Template: Test Plan Report"
canonical: "https://docs.getxray.app/space/XRAYCLOUD/44578481/Document%20Generator%20Template%3A%20Test%20Plan%20Report"
format: markdown
---
> Macro (ui-expand)
> 
> > Macro (toc)

# Introduction

The Test Plan Report enables you to extract details of a [Test Plan](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565153), 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 [Test Executions](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565117), so that you can generate a document report focusing on what matters the most for your team, or even share it with someone else that hasn't access to Jira.

Possible usage scenarios:

- See all the Requirements covered by the Test Plan.
- See all the Defects linked to this Test Plan.
- See an overall status summary of the Test Plan.
- See a summary of the Tests that are part of the Test Plan.
- Check specific details of a Test Execution (like Evidence, attachments, assignee, etc.).

## Output Example(s)

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

![Figure 1 - Report](media://c1b6608f-930a-4d03-a0ac-0851f69403a9)

![Figure 2 - Report.png](media://45342a5b-85a1-4f9c-92e9-523238334836)

![Figure 3 - Report](media://57bfa0e5-aba9-4f2b-aa7e-7ae6a0b92caa)

![Figure 4 - Report](media://6117e6bf-fd1e-41ff-b08c-da37bbaa2cd2)

![Figure 5 - Report.png](media://40651d55-8f36-4af4-bd25-406688b39c0d)

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

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

### Source Data

This report is applicable to one Test Plan 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 has a set of assumptions that you make sure that your Jira/Xray environment complies with:

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

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


## Understanding the Report

The Test Plan report provides detailed information about the Test Plan provided.

### Layout

The report is composed of several sections. Two major sections are available: *Introduction* and *Test Executions Details*.

By default, all details from the [Test Runs](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565109) associated with the Test Plan will be rendered; you can change this behavior on the Template (more info below).

#### Introduction

This section is divided into six sub-sections to provide an overview of the Test Plan you have just exported:

1. Document overview.
2. Test Plan Details.
3. Requirements covered by the Tests in this Test Plan.
4. Overall Execution Status.
5. Defects
6. Tests Summary.

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

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

| **Field** | **Description** | **Sample Code** |
| --- | --- | --- |
| Begin Date | Timestamp of the Begin Date field present in the Test Plan (with proper format) | *${dateformat("dd-MM-yyyy HH:mm:ss"):Begin Date}* |
| End Date | Timestamp of the End Date field present in the Test Plan (with proper format) | *${dateformat("dd-MM-yyyy HH:mm:ss"):End Date}* |
| Summary | Summary of the Test Plan | *${Summary}* |
| Description | Description of the Test Plan (as this field accepts wiki markup we will use "wiki:" in the code to be interpreted by the document) | *${wiki:Description}* |

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

![Figure 9 - Output](media://ae299658-b273-4322-87cf-cdb58ce85e5e)

#### Requirements covered by the Tests in this Test Plan

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,* and *Workflow Status,* removing all the repeated entries.

| **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 10).

![Figure 10 - Table](media://e74a733d-43c3-4f99-9dec-8790e6112be1)

#### Overall Execution Status

As the name suggests, there's an overview of the executions of the Tests in this Test Plan.

Here you will have information about how many Tests you have in this Test Plan and what are the statuses of their executions.

To obtain this information, we are using:

| **Field** | **Description** | **Sample Code** |
| --- | --- | --- |
| TestsCount | The total number of Tests in this Test Plan | *${TestsCount}* |
| #Tests | 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 11):

![Figure 11 - Output](media://1a38d7bb-7b0e-41fb-9b5d-f352bbe4c31e)

#### Defects

In this section, we are listing all the Defects found that are associated with this Test Plan. 

We consider Defects associated with Test Runs, defects in [Document Generator Template: Test Plan Report](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44578481), or defects found during the iterations. We do not print duplicates.

| **Field** | **Description** | **Sample Code** |
| --- | --- | --- |
| Key | Key of the Defect | - TestRun
  - *@{title=${TestExecutions[n].TestRuns[a].ExecutionDefects[d].Key}|href=${BaseURL}/browse/${TestExecutions[n].TestRuns[a].ExecutionDefects[d].Key}}*
- TestSteps
  - *@{title=${TestExecutions[n].TestRuns[a].TestSteps[j].Defects[m].Key}|href=${BaseURL}/browse/${TestExecutions[n].TestRuns[a].TestSteps[j].Defects[m].Key}}*
- Iteration TestSteps
  - *@{title=${TestExecutions[n].TestRuns[a].Iterations[it].TestSteps[r].Defects[dc].Key}|href=${BaseURL}/browse/${TestExecutions[n].TestRuns[a].Iterations[it].TestSteps[r].Defects[dc].Key}}* |
| Summary | Summary of the Defect | - TestRun
  - *${TestExecutions[n].TestRuns[a].ExecutionDefects[d].Summary}*
- TestSteps
  - *${TestExecutions[n].TestRuns[a].TestSteps[j].Defects[m].Summary}*
- Iteration TestSteps
  - *${TestExecutions[n].TestRuns[a].Iterations[it].TestSteps[r].Defects[dc].Summary}* |
| Priority | Priority of the Defect | - TestRun
  - *${TestExecutions[n].TestRuns[a].ExecutionDefects[d].Priority}*
- TestSteps
  - *${TestExecutions[n].TestRuns[a].TestSteps[j].Defects[m].Priority}*
- Iteration TestSteps
  - *${TestExecutions[n].TestRuns[a].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 Plan (Figure 12).

![Figure 12 - Table](media://e5cf475c-274a-499b-b515-57b96538bf88)

#### Tests Summary

In this section, there's a table with information regarding the Tests included in this Test Plan. You can find the following information about each Test:

| **Field** | **Description** | **Sample Code** |
| --- | --- | --- |
| Key | Key of the Test in a link form | *@{title=${Tests[n].Key}|href=${BaseURL}/browse/${Tests[n].Key}}* |
| Summary | The Summary of the Test | *${Tests[n].Summary}* |
| Issue Assignee | Full name of the assignee | *${fullname:Tests[n].AssigneeId}* |
| Requirements | List of requirements covered by this Test (Check the template to see the extra cycle we need to list this information) | *${Tests[n].Links[k].Key}* |
| Test Executions | List of IDs of the Test Executions for each Test (Check the template to see the extra cycle we need to list this information) | *${Tests[n].TestExecutions[j].Key}* |
| Latest Status | Latest Status of the execution | *${Tests[n].TestStatus}* |


This information is presented in a table as we can see below (Figure 13):

![Figure 13 - Table](media://fec63d57-69d7-43f5-b681-064ce2b1830c)

<span style="color: #172b4d">Some particularities to highlight a different behavior about the code needed to show the </span><span style="color: #172b4d">*Tests Runs*</span><span style="color: #172b4d"> sectio</span>n:

- Ability to put the Tests with a particular status on top of the table (more info below).
- 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 Executions

This section will gather all the information related to each Test Execution of each Test in the Test Plan with all the possible details.

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

#### Test Executions Summary

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

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

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

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

![Figure 14 - Table.png](media://03e9667e-b73e-4d63-8122-203c04c9d87a)

##### 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=${TestExecutions[n].TestRuns[a].ExecutionDefects[d].Key}|href=${BaseURL}/browse/${TestExecutions[n].TestRuns[a].ExecutionDefects[d].Key}}* |
| *Summary* | Summary of the Defect | *${TestExecutions[n].TestRuns[a].ExecutionDefects[d].Summary}* |
| *Priority* | Priority associated with the defect | *${TestExecutions[n].TestRuns[a].ExecutionDefects[d].Priority}* |

The table will be similar to the one below (Figure 15):

![Figure 15 - Table.png](media://62507874-fed3-476a-a16a-7e4c54cf94df)

##### Execution Evidences

If any Evidence was attached to the Test Run, we are showing it in the table with the File Name, and a screenshot if the Evidence is an image (otherwise, just a link).

To obtain that information, we used the following code:

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

The table in case of Evidence is of the type image, and will have the following aspect (Figure 16):

![Figure 16 - Table](media://ab548696-ca36-452b-9807-525f5222cbd6)

##### Comment

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

##### Test Description

The description of the Test Run (*${wiki:TestExecutions[n].TestRuns[a].Description}*)

##### Test Issue Attachments

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

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

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

![Figure 17 - Table](media://031e3982-c5fd-4270-8b0b-9cac708044d0)

##### Preconditions

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

| **Key** | **Description** | **Sample Code** |
| --- | --- | --- |
| Precondition | The definition of the precondition associated with the TesRun | *${wiki:TestExecutions[n].TestRuns[a].PreConditions[l].PreCondition.Definition}* |

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

![Figure 18 - Preconditions](media://d01a7840-eb78-4d16-996b-c7532e181f16)

##### Parameters

This section lists the existing [Parameters](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565547) of the Test Run (we are iterating through the Parameters of the Test Run with: *#{for m=TestExecutions[n].TestRuns[a].ParametersCount})*.

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

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

![Figure 19 - Table](media://74d909e7-f1dc-44dc-b8a6-bc1b792a0a5e)

##### Iterations

This section uses a sentence to show how many interactions there are (more details in the next sections).

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

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

![Figure 20 - Table](media://53e52011-46fd-4f6e-9737-b8b9bff240fd)

###### 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 | *${TestExecutions[n].TestRuns[a].IterationsOverallExecutionStatus}* |
| TO DO<br>EXECUTING<br>PASS<br>FAIL<br>ABORTED | Overall Execution Status per Status | *${TestExecutions[n].TestRuns[a].IterationsOverallExecutionStatus.TO DO}*<br>*${TestExecutions[n].TestRuns[a].IterationsOverallExecutionStatus.EXECUTING}*<br>*${TestExecutions[n].TestRuns[a].IterationsOverallExecutionStatus.PASSED}*<br>*${TestExecutions[n].TestRuns[a].IterationsOverallExecutionStatus.FAILED}*<br>*${TestExecutions[n].TestRuns[a].IterationsOverallExecutionStatus.ABORTED}* |

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

![Figure 21 - Table](media://ab548696-ca36-452b-9807-525f5222cbd6)

###### 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 | *${TestExecutions[n].TestRuns[a].Iterations[m].Name}* |
| Status | Status of the iteration | *${TestExecutions[n].TestRuns[a].Iterations[m].Status}* |
| Total Parameters | Total number of parameters | *${TestExecutions[n].TestRuns[a].Iterations[m].ParametersCount}* |
| Parameters | Lists all parameters in the form of Key=Value | *${TestExecutions[n].TestRuns[a].Iterations[m].Parameters}* |

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

![Figure 22 - Details](media://cb79011c-7d2e-4bb3-bf32-9cc151ef593d)

###### 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 | *${TestExecutions[n].TestRuns[a].Iterations[m].PreConditions[l].Key}* |
| Definition | Iteration precondition definition | *${wiki:TestExecutions[n].TestRuns[a].Iterations[m].PreConditions[l].PreCondition.Definition}* |

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

![Figure 23 - Precondition](media://dffd2ff7-7db7-4dfa-aa56-54041b056bb3)

###### 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 | *${TestExecutions[n].TestRuns[a].Iterations[m].Parameters[l].Key}* |
| Value | Parameter Value | *${TestExecutions[n].TestRuns[a].Iterations[m].Parameters[l].Value}* |

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

![Figure 24 - Table](media://04050f9e-5f55-43ae-84cd-e7ef07598b84)

###### Iteration Test Step Details

In this section, we are listing the details of an iteration.

We are listing each step with details. The code we use for that purpose is presented in the table below.

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

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

![Figure 25 - Table](media://f2a2082e-d44c-4c01-aa68-611a3c42467a)

This section shows the Test details.

For that, we are considering the different possible Tests we can have in Xray: [Generic](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565229), 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 | *${TestExecutions[n].TestRuns[a].TestType}* | ![Output1](media://0b2bb913-9709-4ee6-b8eb-1a013fb9e39d) |
| Specification | Definition of the Generic test | *${TestExecutions[n].TestRuns[a].Generic Test Definition}* |
| Cucumber | Test Type | Test Type field | *${TestExecutions[n].TestRuns[a].TestType}* | ![Output2](media://b75c16b5-73c5-4f54-a1c5-682d8f9e5cbe) |
| Gherkin Specification | Gherkin specification of the Test | *${TestExecutions[n].TestRuns[a].Cucumber Scenario}* |
| Manual | Step | Step Number | *${TestExecutions[n].TestRuns[a].TestSteps[r].StepNumber}* | ![Output2](media://50a15513-f90b-416c-9c7b-86fa8b0b9f4d) |
| Action | Action of the Test Step | *${TestExecutions[n].TestRuns[a].TestSteps[r].Action}* |
| Data | Data of the Test Step | *${TestExecutions[n].TestRuns[a].TestSteps[r].Data}* |
| Expected Result | Expected Result of the Test Step | *${TestExecutions[n].TestRuns[a].TestSteps[r].ExpectedResult}* |
| Attachment | Attachment of the Test Step | *${TestExecutions[n].TestRuns[a].TestSteps[r].Attachments[sa].FileURL}*<br>*!${TestExecutions[n].TestRuns[a].TestSteps[r]. Attachments[sa]. Attachment|maxwidth=100}* |
| Comment | Comment on the Test Step | *${wiki:TestExecutions[n].TestRuns[a].TestSteps[r].Comment}* |
| Defects | Defects associated with the Test Step | *${TestExecutions[n].TestRuns[a].TestSteps[r].Defects[dc].Key}* |
| Evidence | Evidence with the Test Step | *${TestExecutions[n].TestRuns[a].TestSteps[r].Evidences[e].FileURL}}*<br>*!${TestExecutions[n].TestRuns[a].TestSteps[r].Evidences[e].Evidence|maxwidth=100}* |
| Status | Status of the Test Step | *${TestExecutions[n].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 | *${TestExecutions[n].Tests[t].Links[j].Key}* |
| Requirement Summary | Summary of the Requirement | *${TestExecutions[n].Tests[t].Links[j].Summary}* |
| Workflow Status | Workflow status of the Requirement | *${TestExecutions[n].Tests[t].Links[j].Status}* |

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

![Figure 26 - Table](media://a30b5fe7-f818-48e1-9bc2-0598ebdd1834)

### Appendix A: Approval

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

![Figure 27 - Approval](media://82304e0c-de8b-4ebe-afcb-a8c148d98909)

## Customizing the Report

### Sections that Can Be Hidden or Shown

The Test Plan 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 below.

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

| **Variable/Flag** | **Purpose** | **Default** | **Example(s)** |
| --- | --- | --- | --- |
| `showTestRunDetails` | To render the details section; format: 0 or 1 | 1 | `${set(showTestRunDetails, 0)}` |
| `showTestRunEvidences` | To render this section; format: 0 or 1 <span style="color: #172b4d">(make sure to define </span>`showTestRunDetails`<span style="color: #172b4d"> at 1)</span> | 1 | `${set(showTestRunEvidences, 0)}` |
| `showTestRunAttachments` | To render this section; format: 0 or 1 <span style="color: #172b4d">(make sure to define </span>`showTestRunDetails`<span style="color: #172b4d"> at 1)</span> | 1 | `${set(showTestRunAttachments, 0)}` |
| `showTestRunIterations` | To render this section; format: 0 or 1 (m<span style="color: #172b4d">ake sure to define </span>**showTestRunDetails**<span style="color: #172b4d"> at 1)</span> | 1 | `${set(showTestRunIterations, 0)}` |
| `statusesToShowFirst` | - To render the *Test Summary* section whose reported status is one in this list first (delimited by a comma); use an empty string '' to include all statuses.
- Format: `'<status1>,<status2>"` | ''<br>(i.e., all statuses) | `${set(statusesToInclude, 'FAILED')}`<br>`${set(statusesToInclude, 'FAIL,EXECUTING')}`<br>`${set(statusesToInclude, '')}` |

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

<span style="color: #000000">As this report is a document with different sections, if some sections are not relevant to you, you should be able to simply delete them. </span>

<span style="color: #000000">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 the:</span>

- <span style="color: #000000">Test Plan itself.</span>
- <span style="color: #000000">Tests associated with the Test Plan.</span>
- <span style="color: #000000">Test Executions associated with the Test Plan.</span>

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

- <span style="color: #000000">Fields of the Test Runs(s).</span>
- <span style="color: #000000">Fields of the covered Issue(s) associated with the Test that is associated with the Test Plan.</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 Test Issue that is connected to the Test Plan, and that you want to show it on the report.</span>

<span style="color: #000000">You can copy the column </span><span style="color: #000000">*Summary*</span><span style="color: #000000"> from the </span><span style="color: #000000">*Tests Summary*</span><span style="color: #000000"> section and adapt it. For this:</span>

1. <span style="color: #000000">Insert a new column in the table.</span>
2. <span style="color: #000000">In the </span><span style="color: #000000">*Tests Summary*</span><span style="color: #000000"> section:</span>
  1. <span style="color: #000000">Copy </span><span style="color: #000000">*Summary*</span><span style="color: #000000"> (insert a column next to it and copy the values from the existing </span><span style="color: #000000">*Summary*</span><span style="color: #000000"> column).</span>
  2. <span style="color: #000000">Change: </span>`${Tests[n].Summary} to ${Tests[n].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 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/space/XPORTERCLOUD/), there's a global setting for this purpose.

# Limitations

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