# 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="https://content.gitbook.com/content/8JzuHWEGbvAoSBN9SPb8/blobs/hHA5dEZchpZ42SAtHZAi/configure-test-ui.png" alt=""><figcaption><p>From the project details page, click configure tests.</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/8JzuHWEGbvAoSBN9SPb8/blobs/QfhfWVhJ1sHcn9waTiWR/Screenshot%202025-01-13%20at%2012.58.06%20PM.png" 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`](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-functions/baseline/set_run_as_baseline) function.

## Close a new run in that project

Executing the [`close_run`](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-functions/run/close_run) 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`](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-functions/test-session/create_test_session) command, providing your new run as the "experiment". Tests will then use the previously-defined `baseline` for comparisons.
