> For the complete documentation index, see [llms.txt](https://sealights-docs.tricentis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sealights-docs.tricentis.com/user-story-coverage/technical-overview/deployment-guide/us2_createreport.sh.md).

# US2\_createReport.sh

This guide explains how to configure the `US2_createReport.sh` script to generate reports for epics with coverage information, based on Jira and SeaLights data.

***

### **Required Variables**

* **JIRA\_TOKEN:** Securely store your Jira access token.
* **JIRA\_GET\_LIST\_JQL:** JQL query to retrieve epics/features/stories for reports (default: `issueType = Epic and created > startOfMonth(-2)`).
  * Update this JQL based on your reporting needs (e.g., user stories instead of epics).
* **JIRA\_BASE\_URL:** Your Jira base URL (e.g., `https://yourdomain.atlassian.net`).
* **SCM\_BASE\_URL:** Your SCM/Git base URL (e.g., `https://github.com`).
* **TEST\_STAGES:** Array of individual test stage names as defined in SeaLights.
  * Define each stage with:
    * `name`: Name as displayed in the TGA report (underscores replace spaces).
    * `reportJsonKey`: Attribute name in the JSON file for this stage.
    * `reportTitle`: Column title in the generated HTML report.
* **GROUPED\_TEST\_STAGES:** Optional array to define grouped test stages:
  * Define each group with:
    * `name`: Desired name in the temporary JSON files.
    * `reportJsonKey`: Attribute name in the exported JSON file.
    * `reportTitle`: Column title in the HTML report.
    * `stages`: Array of individual test stage names from `TEST_STAGES` to combine.
* **severity**: Set to:
  * `1`: Colors results orange if coverage is "No" in the HTML report.
  * `2`: Colors results red if coverage is "No" in the HTML report.

### **Output Reports**

* `${TICKET_TYPE}_${TICKET}.html`: HTML report for each ticket.
* `ReportInfo_${TICKET}.json`: JSON file with report data for further analysis.

***

### **Customization and Tips**

* Adapt the JQL query to target specific Jira issue types.
* Modify test stage definitions and grouping according to your testing processes.
* Consider setting `severity` based on your desired visual indicator for missing coverage.
* Adjust default variables and customize report appearance as needed.
