# How It Works?

### Streamlining Testing with SeaLights: Intelligent Test Selection

{% embed url="<https://youtu.be/1VnvoHd3mL0>" %}

With a growing codebase and test suite, running all tests for every code change becomes impractical and inefficient. Most code changes impact only a specific subset of tests. SeaLights Test Optimization engine, **powered by machine learning, intelligently maps each method in your code to its corresponding tests.** This precise mapping empowers you to:

* **Run only the relevant tests:** Identify and select the **exact tests associated with code changes** in a new build, ensuring optimal coverage without unnecessary redundancy.
* **Focus on what matters:** By skipping tests unlikely to fail, you can **streamline testing cycles** and **free up resources** for other critical tasks.

The **selected subset of tests is automatically executed by different test runners,** further streamlining your testing process.

***

For a deeper understanding of the mechanism and its functionalities, refer to the following steps.

{% content-ref url="how-it-works/associating-code-with-tests" %}
[associating-code-with-tests](https://docs.sealights.io/knowledgebase/test-optimization/how-it-works/associating-code-with-tests)
{% endcontent-ref %}

{% content-ref url="how-it-works/detecting-modified-code" %}
[detecting-modified-code](https://docs.sealights.io/knowledgebase/test-optimization/how-it-works/detecting-modified-code)
{% endcontent-ref %}

{% content-ref url="how-it-works/generating-test-recommendations" %}
[generating-test-recommendations](https://docs.sealights.io/knowledgebase/test-optimization/how-it-works/generating-test-recommendations)
{% endcontent-ref %}

By leveraging SeaLights Test Optimization you can **dramatically improve testing efficiency and effectiveness** while maintaining the highest quality standards, ultimately accelerating your development process and delivering software with confidence.


---

# 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/how-it-works.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.
