> For the complete documentation index, see [llms.txt](https://docs.midio.com/midio-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.midio.com/midio-docs/guides/writing-tests.md).

# Writing tests

## Adding a new test

Midio comes with a simple interface for writing and running tests, found in the [`Testing`](/midio-docs/built-in-nodes/core-std.md#testing) module.

To add a test, first add a [`Testing Test`](/midio-docs/built-in-nodes/core-std.md#test) event node, and give it a name.

<figure><img src="/files/Xog9JtRrL5HoviTA5nFF" alt="" width="496"><figcaption></figcaption></figure>

If you open the 'Services' panel and click the 'refresh services list' button, you will get a new item called **Testing**. Click it to get an overview of all your tests, and buttons to execute them.

<figure><img src="/files/FqV7mdQWrqz5M2R2EXIg" alt=""><figcaption></figcaption></figure>

## Assertions

The Testing module contains several functions which can be used to perform assertions during a test, like `Testing.AssertEqual`. These functions can only be used in the context of a test, and will report to the testing service whether they pass or fail.

<figure><img src="/files/mVsal2NzBGQRkvFoDiMj" alt="" width="563"><figcaption></figcaption></figure>

You can then click on the **Run all** button to run all tests, or the individual **Run** buttons to run a single test at a time.

<figure><img src="/files/d6dFO9lHxO43TMpBapb4" alt="" width="332"><figcaption></figcaption></figure>

## Tips

Clicking on a test in the services panel will make the editor jump directly to where that test is defined.
