# Executing Tests Via SDK

Tests can also be executed via the SDK after results data has been reported. This requires the following steps.

## Report an initial run and set that as a baseline

<figure><img src="/files/j9bxNDHKb2y6xXcY09lR" alt=""><figcaption><p>From the project details page, click configure tests.</p></figcaption></figure>

<figure><img src="/files/WMgVP3zD3zCwOA0SbfqE" alt=""><figcaption><p>Select the baseline run in the dropdown against which you would like new experiment runs to be compared.</p></figcaption></figure>

### Setting baseline in SDK

Alternatively, you can also set a Run as baseline using the [`set_run_as_baseline`](/v0.21.x/using-distributional/python-sdk/sdk-functions/baseline/set_run_as_baseline.md) function.

## Close a new run in that project

Executing the [`close_run`](/v0.21.x/using-distributional/python-sdk/sdk-functions/run/close_run.md) command for a new run in that same project will finalize the data, enabling it for use in Tests.

### Create Test Session

Execute the [`create_test_session`](/v0.21.x/using-distributional/python-sdk/sdk-functions/test-session/create_test_session.md) command, providing your new run as the "experiment". Tests will then use the previously-defined `baseline` for comparisons.


---

# 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.dbnl.com/v0.21.x/using-distributional/testing/executing-tests/executing-tests-via-sdk.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.
