# TestSession

<pre class="language-python"><code class="lang-python">class TestSession(DBNLObject):
    id: str
    project_id: str
    inputs: list[<a data-footnote-ref href="#user-content-fn-1">TestSessionInput</a>]
    status: Literal["PENDING", "RUNNING", "PASSED", "FAILED"]
    failure: Optional[str] = None
    num_tests_passed: Optional[int] = None
    num_tests_failed: Optional[int] = None
    num_tests_errored: Optional[int] = None
    include_tag_ids: Optional[list[str]] = None
    exclude_tag_ids: Optional[list[str]] = None
    require_tag_ids: Optional[list[str]] = None
</code></pre>

## TestSessionInput

```python
class TestSessionInput(DBNLObject):
    run_alias: str
    run_id: Optional[str] = None
    run_query_id: Optional[str] = None
```

## Supported Functions

[`dbnl.create_test_session`](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-functions/test-session/create_test_session)

[`dbnl.experimental.get_test_sessions`](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-experimental-functions/get_test_sessions)

[`dbnl.experimental.wait_for_test_session`](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-experimental-functions/wait_for_test_session)

[^1]: [`TestSessionInput`](#testsessioninput)


---

# 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/python-sdk/sdk-objects/testsession.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.
