> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Quality Test Cases

> Create no-code data quality tests at the table, column, and dimension level from the OpenMetadata UI, set failure thresholds, schedule runs, and review results.

# Create Quality Test Cases

Run data quality tests at the table, column, and dimension level across all supported database connectors. Tests range from business validations, which confirm data meets real-world expectations, to technical checks such as ensuring required columns are never null and identifier columns hold only unique values.

You don't need a YAML or JSON config file. Set up everything from the UI by choosing a test level, filling in the details, and creating the test.

Before you start, make sure you have permission to create tests on the table.

## How to Create a Test

1. Go to the table you want to test and click the **Data Observability** tab.

2. Click **Add Test**.

   ![Add Test menu on the Data Observability tab](https://mintcdn.com/openmetadata/_KeVW49LLDy5-zxk/public/images/v2.1.x/how-to-guides/quality/test1.png?fit=max\&auto=format\&n=_KeVW49LLDy5-zxk\&q=85\&s=92532020a7b4f7185964cb9f75964e19)

3. Select a **Table**, **Column**, or **Dimension** level test.

4. Enter the test details. See [Table Level Test](#table-level-test), [Column Level Test](#column-level-test), and [Dimension Level Test](#dimension-level-test) for the fields of each level.

5. Click **Create** to save the test.

## Table Level Test

A **Table Level Test** validates properties of the whole table, such as row counts or column structure. It can also check insert freshness or custom SQL logic.

Enter the following details:

* **Name**: A name that describes your test case.
* **Test Type**: The validation to run. The fields below it depend on the test type.
* **Description**: What the test validates.

OpenMetadata currently supports the following table level test types:

* Table Column Count to be Between: Define the Min. and Max.
* Table Column Count to Equal: Define a number.
* Table Column Name to Exist: Define a column name.
* Table Column Names to Match Set: Add comma-separated column names to match. Optionally, verify that the column names are in order.
* Custom SQL Query: Define a SQL expression. Select a strategy if it should apply for Rows or for Count. Define a threshold to determine if the test passes or fails.
* Table Row Count to be Between: Define the Min. and Max.
* Table Row Count to Equal: Define a number.
* Table Row Inserted Count to be Between: Define the Min. and Max. row count. This test will work for columns whose values are of the type Timestamp, Date, and Date Time field. Specify the range type in terms of Hour, Day, Month, or Year. Define the interval based on the range type selected.
* Compare 2 Tables for Differences: Compare 2 tables for differences. Checks integrity between the two tables. Optionally set **Parallel queries per database** (default 1). A higher value compares large tables faster, at the cost of more load on both databases.

![Configure a Table Level Test](https://mintcdn.com/openmetadata/_KeVW49LLDy5-zxk/public/images/v2.1.x/how-to-guides/quality/test4.png?fit=max\&auto=format\&n=_KeVW49LLDy5-zxk\&q=85\&s=4e10158512b0c3a516e5c40c93f90698)

For the fields and behavior of each test, see [Tests in the OpenMetadata UI](https://docs.open-metadata.org/v2.1.x/how-to-guides/data-quality-observability/quality/tests-ui.md).

## Column Level Test

A **Column Level Test** validates the values of one column, such as null counts or value ranges. It can also check uniqueness and pattern matching.

Enter the following details:

* **Column**: The column to test. A summary of the column appears next to the form.
* **Name**: A name that describes your test case.
* **Test Type**: The validation to run. The fields below it depend on the test type.
* **Description**: What the test validates.

> [!NOTE]
>
> Column tests attach to top-level columns only. Nested (struct) child columns don't appear in the **Column** selector. To validate a nested field, create a [Table Custom SQL Test](https://docs.open-metadata.org/v2.1.x/how-to-guides/data-quality-observability/quality/tests-ui.md#table-custom-sql-test) that returns the rows with an invalid value, or ingest a view that exposes the nested field as a column and test the view.

OpenMetadata currently supports the following column level test types:

* Column Value Lengths to be Between: Define the Min. and Max.
* Column Value Max. to be Between: Define the Min. and Max.
* Column Value Mean to be Between: Define the Min. and Max.
* Column Value Median to be Between: Define the Min. and Max.
* Column Value Min. to be Between: Define the Min. and Max.
* Column Values Missing Count: Define the number of missing values. Optionally, match all null and empty values as missing, and configure additional missing strings, such as N/A.
* Column Values Sum to be Between: Define the Min. and Max.
* Column Value Std Dev to be Between: Define the Min. and Max.
* Column Values to be Between: Define the Min. and Max.
* Column Values to be in Set: Add an array of allowed values.
* Column Values to be Not in Set: Add an array of forbidden values.
* Column Values to be Not Null
* Column Values to be Unique
* Column Values to Match Regex Pattern: Define the regular expression that the column entries should match.
* Column Values to Not Match Regex: Define the regular expression that the column entries should not match.
* Column Values To Be At Expected Location: Define a geographic area, such as a radius around an expected location, that latitude and longitude values must fall within.

![Configure a Column Level Test](https://mintcdn.com/openmetadata/_KeVW49LLDy5-zxk/public/images/v2.1.x/how-to-guides/quality/test2.png?fit=max\&auto=format\&n=_KeVW49LLDy5-zxk\&q=85\&s=4a0167d974d74443b2c39e10d654f5ae)

For the fields and behavior of each test, see [Column Tests - UI Config](https://docs.open-metadata.org/v2.1.x/how-to-guides/data-quality-observability/quality/tests-ui/column-tests.md).

### Set a Failure Threshold (Optional)

Many test definitions let you choose how many failures to tolerate before the test is marked as failed. By default no failures are tolerated, so a single failing row fails the test. The form shows **Failure Threshold** and **Threshold Unit** fields for the tests listed in [Tests That Support a Failure Threshold](#tests-that-support-a-failure-threshold).

1. In **Select Test Type**, pick a test, for example **Column Values To Be Not Null**.

2. In **Failure Threshold**, enter the number of failures to tolerate. It can't be negative.

   ![Add Test case form showing the Failure Threshold and Threshold Unit fields with the Preview](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/failure-threshold-form.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=106d5d9a482f376d4651340b4c991a2b)

3. In **Threshold Unit**, choose how the threshold is measured:

   * **rows**: a count of failing rows. In the API this is `ABSOLUTE`.
   * **% of rows**: a share of the rows evaluated. For row-level tests the value can't be higher than 100. In the API this is `PERCENTAGE`.

   ![Add Test case form with the Threshold Unit dropdown open, showing the rows and % of rows options](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/threshold-unit-dropdown.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=eed9c469c38d1681616d57d7caab76b2)

4. Check the **Preview**. It restates your choice, for example "Fail when more than 0 row(s) in column fail this test." A second line shows what the check is measured on, for example "Measured on the 100% sample this table is profiled with."

5. Optional: Turn on **Compute Row Count**.

6. Confirm the **Data Quality Dimension**.

7. Enter a name.

8. Click **Create**.

Keep **Show Hint** on to read each field description in the **Form Hint** panel.

How the threshold is applied depends on the test:

* **Row-level tests** count the rows that break the rule. They fail when that count, or its share of the evaluated rows, is above the threshold.
* **Statistical tests** widen the accepted bounds by the threshold, so small deviations don't fail the test.

The threshold means something different for each test, behaves differently on sampled tables, and applies per group in dimension-level tests. For more information, see [Failure Thresholds](https://docs.open-metadata.org/v2.1.x/how-to-guides/data-quality-observability/quality/failure-thresholds.md).

If you enter an invalid value, such as a negative threshold, OpenMetadata rejects the test case with an error when you save it.

Two tests behave differently:

* **Column Values to be in Set** rejects a non-zero threshold when its `matchEnum` option is off, because that mode has no failing rows to tolerate. A threshold of `0` is always accepted.
* **Custom SQL Query** has its own **Threshold** and **Operator**. Its threshold is a value that the query result is compared with, not a number of failures to tolerate. The form adds only a **Threshold Unit** field.

#### Tests That Support a Failure Threshold

The following tables show which tests have the threshold fields.

##### Table Level Tests

This table shows which table level tests support the threshold fields.

| Test | Failure Threshold and Threshold Unit |
| - | - |
| Table Column Count to be Between | Supported |
| Table Column Count to Equal | Supported |
| Table Row Count to be Between | Supported |
| Table Row Count to Equal | Supported |
| Table Row Inserted Count to be Between | Supported |
| Custom SQL Query | **Threshold Unit** only. It keeps its own **Threshold** and **Operator**. |
| Table Column Name to Exist | Not applicable |
| Table Column Names to Match Set | Not applicable |
| Compare 2 Tables for Differences | Not applicable. It has its own **Threshold**, the number of differing rows allowed. |

##### Column Level Tests

This table shows which column level tests support the threshold fields.

| Test | Failure Threshold and Threshold Unit |
| - | - |
| Column Value Lengths to be Between | Supported |
| Column Value Max. to be Between | Supported |
| Column Value Mean to be Between | Supported |
| Column Value Median to be Between | Supported |
| Column Value Min. to be Between | Supported |
| Column Values Missing Count | Supported |
| Column Values Sum to be Between | Supported |
| Column Value Std Dev to be Between | Supported |
| Column Values to be Between | Supported |
| Column Values to be in Set | Supported, with the `matchEnum` rule above |
| Column Values to be Not in Set | Supported |
| Column Values to be Not Null | Supported |
| Column Values to be Unique | Supported |
| Column Values to Match Regex Pattern | Supported |
| Column Values to Not Match Regex | Supported |
| Column Values To Be At Expected Location | Shown, but not applied yet. The test is still evaluated with no tolerance. |

For a worked example, see [Column Values to Be Not Null](https://docs.open-metadata.org/v2.1.x/how-to-guides/data-quality-observability/quality/tests-ui/column-tests.md#column-values-to-be-not-null).

## Dimension Level Test

A dimension level test is a column test whose results are split by one or more dimension columns, to show which segment of the data is failing. For concepts, setup, and examples, see [Dimensional Validation](https://docs.open-metadata.org/v2.1.x/how-to-guides/data-quality-observability/quality/dimensional-validation.md).

## View Test Results

After you create a test, it appears in the **Data Quality** tab. Edit its display name and description there.

![Test case listed in the Data Quality tab](https://mintcdn.com/openmetadata/hh5nHFImSbxUEO9H/public/images/how-to-guides/quality/test3.png?fit=max\&auto=format\&n=hh5nHFImSbxUEO9H\&q=85\&s=71308347e933f7e77aeb56d8812374bd)

### Filter Test Cases by Status

Navigate to **Observability** > **Data Quality** and select the **Test Cases** tab. The filter bar has **Advanced**, **Table**, **Type**, **Status**, and **Tags** filters. Use **Clear All** to reset them.

![Test Cases tab on the Data Quality page with the filter bar](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/test-cases-status-filter.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=cdb340b8e6e61c1d06df09992ffee6f3)

The **Status** filter accepts several values at once. To filter by more than one status:

1. Click **Status**.
2. Select one or more of **Aborted**, **Failed**, **Queued**, and **Success**.
3. Click **Apply**. The button shows how many statuses you selected, for example **Apply (2)**.

   ![Status filter with Queued and Success selected and the Apply (2) button](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/test-cases-status-dropdown.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=25336f8d72027c2b9946cc4d579650b3)

A test case matches if it has any selected status. A number next to **Status** shows how many statuses are applied. Click **Clear all** in the dropdown to remove the selection, or **Cancel** to close it without changes.

### Open Test Cases From the Summary Tab

The **Summary** tab of **Data Quality** shows **Data Health** cards. In the **Healthy Data Assets** card, select the **Healthy** or **Unhealthy** segment to open the **Test Cases** tab with the matching statuses already applied:

* **Healthy**: `Success` and `Queued`.
* **Unhealthy**: `Failed` and `Aborted`.

![Healthy Data Assets card on the Data Quality Summary tab, showing Healthy and Unhealthy counts](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/data-health-healthy-assets.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=e7028cfc9c083c965074eba611772af7)

### Review Result History

To see how a test case has performed over time, open it from **Data Quality** > **Test Cases**. The **Test Case Results** tab shows:

* **Last run**:
  * The latest status and a message with the measured value and the expected range.
  * The **Result / Expected** values.
  * The run time and when the next run is due, or **Not Scheduled**.
* **Result history**: a chart of the measured value over time. The caption shows what is measured and what it is compared against, for example "Column count vs. allowed range 2–10". A dashed line marks the allowed limit.
* **Configuration**, **Description**, **Test Suites**, **Tags**, **Glossary Term**, and **Data Products** panels beside the chart.

![Test case details page showing the Last run banner, the Result history chart, and the date range picker](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/result-history-card.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=54575966c600e85983248c86a95783d8)

To change the time window:

1. Click the date range on the **Result history** card. By default it covers the last 30 days and ends today.
2. Choose a time range in one of two ways:
   * Select a preset: **Today**, **Yesterday**, **This week**, **Last week**, **This month**, **Last month**, **This year**, **Last year**, or **All time**.
   * Pick start and end dates on the calendars, or type them in the date fields.
3. Click **Apply**.

![Date range picker with presets, two calendars, start and end date fields, and the Cancel and Apply buttons](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/result-history-date-range.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=c49140ee06860981342a70ba62246daa)

Below the chart, five tiles summarize the selected window:

| Tile | Meaning |
| - | - |
| Runs | All runs, including queued runs |
| Passed | Runs that succeeded |
| Failed | Runs that failed |
| Aborted | Runs that stopped before finishing |
| Success rate | Passed runs as a share of completed runs |

Queued runs count toward **Runs** but not toward the success rate, so the tiles might not add up to **Runs**. The success rate shows a dash when no run has completed.

![Result history chart with the Runs, Passed, Failed, Aborted, and Success rate tiles and the Run Details card](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/result-history-tiles-run-details.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=98dcde066ef377aa9464177e9e54d074)

### Review Run Details

Below the tiles, the **Run Details** card shows the latest run by default. Hover over a point on the chart to see its time and status. Select a point to show that run. The card then shows a **Selected run** label, and **Back to latest** returns to the latest run.

The card shows the run status and time, and the test definition. It also shows the **Expected**, **Found**, and **Difference** values. For an aborted run, **Found** and **Difference** show a dash, because the run didn't produce a result.

![Run Details card for an aborted run, with the Selected run label and the Back to latest link](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/run-details-aborted.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=9f4459ff342d7a3dd3d8ba216666de37)

For an aborted run, the card also shows an **Execution error** section below the values. It shows the error message from the failed run, for example a database connection error. Long messages are shortened. Click **more** to read the rest.

![Run Details card for an aborted run showing the Execution error section with a database connection error message and a more link](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/run-details-execution-error.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=441926f9814e28dca182605b13e54e6d)

> [!WARNING]
>
> The error message can include host names, SQL text, and file paths from the ingestion run. Anyone who can view test results can see it.

From OpenMetadata 2.0.6, the run that executed an aborted test case also records it as an execution failure. A run whose tests couldn't execute no longer ends as successful, and its success percentage counts each aborted test as a failure.

## Set Up a Pipeline

Set up a pipeline to run test cases at a regular interval, or on demand.

> [!NOTE]
>
> **Note**: Data quality pipelines aren't created from the **Agents** tab of a database service, where you create metadata, profiler, and other agents. Create them from the table or the **Data Quality** page, as described below. To create a pipeline, you need permission on the Ingestion Pipeline resource. For an example policy, see [Use Case 7](https://docs.open-metadata.org/v2.1.x/how-to-guides/admin-guide/roles-policies/use-cases.md).

1. On the **Data Quality** page, select the test suite and click the **Pipelines** tab.

   Alternatively, open the table, go to **Data Observability** > **Data Quality**, and click the **Pipelines** tab.

   ![Set up a Pipeline](https://mintcdn.com/openmetadata/_KeVW49LLDy5-zxk/public/images/v2.1.x/how-to-guides/quality/test5.png?fit=max\&auto=format\&n=_KeVW49LLDy5-zxk\&q=85\&s=ed36db46949e8c45ab396854045fb308)

2. Click **Add Pipeline**.

3. In the **Add Ingestion** form, do the following:
   * Enter a **Name** for the pipeline.

   * Under **Scheduler for Test Cases**, choose how the pipeline runs:
     * **Schedule**: the test cases run repeatedly on your schedule.
     * **On Demand**: the test cases run once, when you start them.

   * For **Schedule**, choose a **Frequency**: **Hourly**, **Daily**, **Weekly**, **Monthly**, or **Custom**.

   * Set the **Time**. A line below it summarizes the result, for example "Test Cases scheduled to run At 12:00 AM, every day". The time zone is UTC.

   * Optional: Turn on **Enable Debug Log** to capture detailed logs.

   * Optional: Turn off **Raise on Error**, which is on by default and stops the run when an error occurs.

     ![Add Ingestion form with the Schedule and On Demand options, the Frequency buttons, the Time field, and the Enable Debug Log and Raise on Error toggles](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/test-pipeline-scheduler.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=3a1aeef066706470b5f7754dc9efee7c)

   * Choose the test cases to run:

     * Turn on **Select All Test Cases** to run every test case in the suite.
     * Or leave it off and select test cases in the **Test case** list. Use **Search Test Cases** and the **Status**, **Test Type**, and **Column** filters to find them. The list shows how many you have selected.

     ![Add Ingestion form with the Select All Test Cases toggle and a list of test cases to select](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/how-to-guides/data-quality-observability/test-pipeline-select-test-cases.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=f9036521e805a6629937c33b564cb209)

4. Click **Submit**.

The pipeline runs at the scheduled time. The results update in the **Data Quality** tab.

![Pipeline Scheduled](https://mintcdn.com/openmetadata/_KeVW49LLDy5-zxk/public/images/v2.1.x/how-to-guides/quality/test7.png?fit=max\&auto=format\&n=_KeVW49LLDy5-zxk\&q=85\&s=96e95197256658aec4e3c3493c5bc36b)

Create several pipelines for one suite, each with its own schedule and its own test cases. This lets you run different test cases at different times.

## Run a Test Case On Demand

You don't have to wait for the schedule. To run your test cases right away, run the pipeline manually:

1. Open the table that has the test case and go to **Data Observability** > **Data Quality**.

2. Select the **Pipelines** tab and find the pipeline that runs your test case.

3. Click the **⋮** menu next to the pipeline and select **Run**.

   ![Pipelines tab on the Data Quality page with the Run option open in the pipeline actions menu](https://mintcdn.com/openmetadata/MQuc6C8Pq3kdRHoX/public/images/how-to-guides/data-quality-observability/quality/run-test-case-pipeline.png?fit=max\&auto=format\&n=MQuc6C8Pq3kdRHoX\&q=85\&s=89a0f2a8ced12da0d04c360844d1d8e4)

4. Check the **Recent Runs** column for the pipeline to follow the result. The test case results update in the **Data Quality** tab.

A manual run doesn't change the pipeline's schedule.

> [!NOTE]
>
> **Note**: The **Run** option appears only if the pipeline is deployed and you have the `Trigger` permission. For more information, see [Authorization](https://docs.open-metadata.org/v2.1.x/how-to-guides/admin-guide/roles-policies/authorization.md).

## Handle Test Failures

When a test fails, OpenMetadata creates an incident for it. If the test case has an owner, the incident is assigned to the owner automatically, so its status shows **Assigned** in the **Incident** column. If the test case has no owner, the status shows **New**.

![Test Cases list on the Data Quality tab with failed tests showing Assigned in the Incident column](https://mintcdn.com/openmetadata/foU00iveZ6wB91OA/public/images/how-to-guides/data-quality-observability/quality/incident-auto-assigned.png?fit=max\&auto=format\&n=foU00iveZ6wB91OA\&q=85\&s=9802857279c7e6c44aa9b617877d7be4)

To change the status of an incident, set it to **New**, **Ack**, **Assigned**, or **Resolved**.

1. In the **Incident** column, click the status of the failed test, for example **New**.

   ![Incident column with the New status highlighted for a failed test](https://mintcdn.com/openmetadata/foU00iveZ6wB91OA/public/images/how-to-guides/data-quality-observability/quality/incident-status-column.png?fit=max\&auto=format\&n=foU00iveZ6wB91OA\&q=85\&s=615acf80388d1b5ce831d594249a805a)

2. Select a status: **Ack**, **Assigned**, **New**, or **Resolved**.

   * If you select **Assigned**, search for and select the assignee, then click the check mark to save.

   ![Incident status dropdown with the Ack, Assigned, New, and Resolved options](https://mintcdn.com/openmetadata/foU00iveZ6wB91OA/public/images/how-to-guides/data-quality-observability/quality/incident-status-options.png?fit=max\&auto=format\&n=foU00iveZ6wB91OA\&q=85\&s=1180210985e1e279af5cfaf5269a038f)

3. If you select **Resolved**, choose a **Reason** and enter a **Comment**. Both are required. The reasons are **Duplicates**, **False Positive**, **Missing Data**, **Other**, and **Out Of Bounds**.

   ![Resolved form with the Reason options and the Comment field](https://mintcdn.com/openmetadata/foU00iveZ6wB91OA/public/images/how-to-guides/data-quality-observability/quality/incident-resolved-form.png?fit=max\&auto=format\&n=foU00iveZ6wB91OA\&q=85\&s=8f8ce9d0d08a0c21d1b8e90b3e498d7a)

4. Click the check mark to save.

Set up [alerts](https://docs.open-metadata.org/v2.1.x/how-to-guides/data-quality-observability/alerts-notifications/data-observability-alerts.md) to be notified when a test fails.

## Delete and Restore a Test Case

> [!NOTE]
>
> **Note**: Deleting a test case from a table's own **Data Observability** tab is a hard delete. Soft delete and restore are only available from the platform-wide Test Cases list described below.

1. Navigate to **Observability** > **Data Quality**, and click **Test Cases**.

2. Find the test case and open its row actions menu, then select **Delete**.

   ![Delete option in the test case row menu](https://mintcdn.com/openmetadata/K0-iCFHODN7qSZEY/public/images/how-to-guides/data-quality-observability/quality/delete-test-case.png?fit=max\&auto=format\&n=K0-iCFHODN7qSZEY\&q=85\&s=9dc81cd6cb50819880e9102f3bb3eecb)

3. The **Delete "\<name>" Test Case** dialog offers two options:

   * **Soft Delete** (selected by default): Turn off this test case. Restore it later.
   * **Permanently Delete**: Delete this test case and all its metadata forever. This can't be undone.

   Choose **Soft Delete** and click **Delete** to keep the test case's execution history and results while turning it off.

   ![Soft Delete and Permanently Delete options](https://mintcdn.com/openmetadata/K0-iCFHODN7qSZEY/public/images/how-to-guides/data-quality-observability/quality/delete-option-test-case.png?fit=max\&auto=format\&n=K0-iCFHODN7qSZEY\&q=85\&s=f2296b555f3099ef72516f9b11550fea)

4. Toggle **Show Deleted** on the Test Cases page to find soft-deleted test cases.

5. Open the row actions menu on a deleted test case and select **Restore**, then confirm. The test case becomes editable and resumes on its existing schedule with its history intact.

   ![Restore option for a soft-deleted test case](https://mintcdn.com/openmetadata/K0-iCFHODN7qSZEY/public/images/how-to-guides/data-quality-observability/quality/restore-test-case.png?fit=max\&auto=format\&n=K0-iCFHODN7qSZEY\&q=85\&s=dbbe35caa99f7b4388bf1db270928d44)

> [!NOTE]
>
> **Note**: Restoring a test case requires **EditAll** permission on test cases. Also restore a deleted test case from its own details page, which stays read-only until it's restored.

> [card] [How to Set Alerts for Test Case Fails](https://docs.open-metadata.org/v2.1.x/how-to-guides/data-quality-observability/alerts-notifications/data-observability-alerts.md)
>
> Get notified when a data quality test fails.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.