# Associating Code With Tests

SeaLights intelligently maps tests to their corresponding code sections, enabling efficient test selection. Here are the three primary methods employed:

### **Statistical Modeling**

* Leverages **machine learning** to analyze each test's impact on code during parallel testing.
* Gradually refines code-to-test mapping for **increasing accuracy and efficiency** over time.

### **One-to-One Mapping (with OpenTelemetry)**

* Uses **OpenTelemetry instrumentation** to capture data on every application operation.
* Precisely maps tests to code methods based on **comprehensive request tracking** throughout your system.

### **Calibration (with Sequential Testing)**

* Employs **sequential testing** to simulate one-to-one mapping results.
* Offers **immediate and accurate mapping** but can be time-consuming compared to other methods.

***

{% content-ref url="/pages/WSgbvJO8U1ICzaGWWxjD" %}
[Statistical modeling](/knowledgebase/test-optimization/how-it-works/associating-code-with-tests/statistical-modeling.md)
{% endcontent-ref %}

{% content-ref url="/pages/hFjk43GHl6BpyKs28jtH" %}
[One-to-One Mapping](/knowledgebase/test-optimization/how-it-works/associating-code-with-tests/one-to-one-mapping.md)
{% endcontent-ref %}

{% content-ref url="/pages/KaETSLR4gmSafgc8oX3n" %}
[Calibration](/knowledgebase/test-optimization/how-it-works/associating-code-with-tests/calibration.md)
{% endcontent-ref %}

{% file src="/files/YdvilklthXpCGQpr0hGa" %}


---

# 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/associating-code-with-tests.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.
