> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/guides/sap/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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sealights.io/knowledgebase/guides/sap/user-story-coverage/technical-overview/deployment-guide/us2_createreport.sh.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
