# Test Groups

**Test Groups** allow you to organize and track tests within a single stage as independent sub-suites. This is the primary solution for supporting modern, parallelized CI pipelines where multiple test jobs run simultaneously.

### Why It Is Useful

In complex pipelines, a single "Functional Test" stage might be split across 20 parallel agents. Without Test Groups:

* SeaLights would view all 20 jobs as one single entity.
* Recommendations might become inaccurate if agents are testing different builds at the same time.
* Savings data would be aggregated, making it hard to see which specific suite is performing efficiently.

### Detailed Functionality

* **Independent Tracking:** Test Optimization recommendations are calculated separately for each group based on its specific execution history.
* **Parallel Resilience:** Different groups can run against different builds simultaneously. One group might be testing Build A while another has already moved to Build B; Test Groups ensure each receives the correct guidance.
* **Granular Analytics:** You can view execution data and optimization savings specifically for one group, rather than just at the stage level.

### Implementation

When executing your tests, you provide two identifiers:

1. **Test Stage:** `testStage`  The standard name for the testing phase (e.g., `Integration_Tests`).
2. **Test Group ID:** `testGroupID`  A unique, meaningful name for the specific sub-suite (e.g., `Payment_Service_Parallel_1`).

### Viewing Results

To see the impact of a specific group:

1. Navigate to **Test Optimization** → **Savings Breakdown**.
2. Use the **Test Group filter** to select the specific ID you wish to analyze.

<figure><img src="/files/d10YCktpanGmD7gSRQ4n" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Note:** Test Groups affect Test Optimization logic only. Code coverage is still aggregated and displayed at the **Test Stage** level.
{% endhint %}


---

# 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/test-optimization/test-optimization-strategy/test-selection-policies/test-groups.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.
