# How to Build a Test Case in TestOwl

:::lead
A Test Case is an automated test that checks a specific user journey or behaviour in your application. It is a sequence of steps that you can record, build by hand, or assemble from reusable Flows.
:::

Every Test Case belongs to a single [Test Suite](/docs/building-tests/test-suites) and can use one or more [Flows](/docs/building-tests/flows) to avoid repeating common steps.

## The Tests page

Open **Tests** from the sidebar to see every Test Case in the project, whichever suite it belongs to. Summary cards show **Total Tests** and **Active Tests**.

![Test Case list](/images/building-tests/test-cases/test-case-list.png)

The table shows each test's **Test Name**, **Priority**, **Created By**, **Test Suite**, **Status**, **Last Run**, and **Tags**. You can:

- **Search** by name, suite, or author.
- Filter by **Test suite**, **Tag**, **Priority**, and **Status**.
- Click **Run** on a row — or select several tests and click **Run** in the toolbar — to run them.
- Select tests and delete them in bulk.

The **Last Run** column shows each test's most recent result, so you can spot failing tests without opening reports.

## Creating a Test Case

1. Click **New Test** on the **Tests** page (or **New Test** inside a suite). The [Step Editor](/docs/building-tests/the-editor) opens.
2. Click the title area to fill in the details:

   - **Name** – A clear, descriptive name.
   - **Description** – What the test verifies.
   - **Suite** – The Test Suite it belongs to (required).
   - **Tags** *(optional)* – For organising and filtering. You can create a new tag right here.
   - **Priority** – The business importance: **Critical**, **High**, **Medium**, or **Low**.
   - **Status** – **Draft**, **Active**, or **Archived**.

3. Build the test, then click **Save**.

![Create Test Case](/images/building-tests/test-cases/create-test-case.png)

## Building a Test Case

You can build a Test Case by:

- **Recording** it with the [Recorder](/docs/building-tests/recording-a-test).
- **Adding steps** from the Step Palette (see the [Step Library](/docs/building-tests/step-library)).
- **Reusing Flows**.
- Combining all three.

You can re-open a recorded test in the Recorder at any time with **Edit using Recorder**.

## Test Case status

| Status | What it means | Can it run? |
| --- | --- | --- |
| **Draft** | Still being developed or reviewed. | Yes — but **not** against a Production environment. |
| **Active** | Ready for regular execution. | Yes. |
| **Archived** | Kept for reference. | No. Set it back to Draft or Active to run it. |

:::warning{title="Draft and Archived tests"}
Draft tests are skipped when you run against an environment whose type is **Production**, and Archived tests can't be run at all. Mark a test **Active** once it has been reviewed and is ready for regular use.
:::

## Priority

Priority helps your team decide which failures need attention first.

| Priority | Typical usage |
| --- | --- |
| **Low** | Edge cases and non-critical scenarios. |
| **Medium** | Standard application coverage. |
| **High** | Important business workflows. |
| **Critical** | Release-blocking functionality. |

## Organising Test Cases

- **Test Suites** group tests by feature.
- **Tags** group tests across suites, such as Smoke or Regression.
- **Priority** shows business importance.
- **Status** tracks development progress.

## Deleting a Test Case

Deleting a Test Case moves it to the [Recycle Bin](/docs/workspace/recycle-bin), and removes it from any [schedule](/docs/running-and-results/schedules) that targets it. It stays there for **15 days** and can be restored at any time; after that it's permanently deleted.

:::info{title="Restoring a deleted test"}
If a test's suite was also deleted, restore the Test Suite first, then the Test Case.
:::

:::warning{title="Permanent deletion"}
Once a Test Case has been in the Recycle Bin for more than **15 days**, or you delete it forever from there, it can't be recovered.
:::

## Best practices

- Keep each Test Case focused on a single user journey or behaviour.
- Reuse [Flows](/docs/building-tests/flows) instead of duplicating common steps.
- Replace hardcoded values with [Variables](/docs/data/variables) and [Secrets](/docs/data/secrets).
- Give Test Cases descriptive names.
- Review Draft tests before marking them Active.

## Next steps

::::cardgrid
:::card{title="Triggering a Run" href="/docs/running-and-results/triggering-a-run"}
Run your Test Cases locally or in the cloud.
:::

:::card{title="Flows" href="/docs/building-tests/flows"}
Reuse common workflows across multiple Test Cases.
:::

:::card{title="Environments" href="/docs/environments/overview"}
Configure where your Test Cases execute.
:::
::::
