# Phase 5: User Story Coverage Analytics

{% hint style="warning" %}
Please contact your SeaLights CSM for assistance with setting up User Story Coverage Analytics.&#x20;
{% endhint %}

User Story Coverage Analytics is a Professional Services toolset, comprised of several scripts, which can be used to view test coverage data in your Jira (or ADO) User Stories.

These scripts work by collecting the ticket IDs of the code changes and then reporting of the user story coverage, processing the information in two parts:

#### 1. Gathering the source code changed per ticket

Using a set of scripts, the code changes are extracted and linked to specific tickets, based on one of three common methods:

1. Extracting the ticket ID from the commit message itself
2. Extracting the ticket ID from the branch name
3. Extracting the ticket ID from the Pull Request title

The code changes are then sent to Sealights with the respective tags via an API, where they are collected to be used later to generate the reports.

#### 2. Reporting

Sealights is accessed through an API to gather all the code changes for a given set of tickets. Then, once the data is ready, the code changes for each user story can be extracted through another API and converted into various reports:

1. **HTML files** – For each user story, an HTML file with its details is created, plus a summary HTML listing all the user stories together.
2. **Confluence** – For each user story, a Confluence page with its details is created, plus a Confluence page with only the untested methods per test group/stage.
3. **Issue Trackers** – Coverage values and a summary text are pushed into the relevant system:
   * **Jira Cloud** via custom fields
   * **Jira On-Prem** via the Jira plugin
   * **Azure DevOps (ADO)** via the ADO plugin


---

# Agent Instructions: 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:

```
GET https://docs.sealights.io/knowledgebase/phased-onboarding/java-onboarding-guide/phase-5-user-story-coverage-analytics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
