> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Test health monitor

:::info

**Goal:** Catch flaky tests before everyone learns to re-run and ignore them.

:::

## What it does

Daily, a schedule checks for flaky or repeatedly failing tests. It files a ticket for each test that either failed and then passed on a re-run with no code change (flaky), or failed more than once in the window with no code change to explain it. This catches test rot early, before a flaky test becomes something everyone just re-runs and ignores.

## The plugin

[`tessl/test-health`](https://tessl.io/registry/tessl/test-health) reads recent CI history, finds the unstable tests, and files a ticket for each one worth fixing. Install it with:

```bash
tessl install tessl/test-health
```

## Define the schedule

Run it every day at 6:00 UTC. Add this entry to the `schedules` block in your project's `tessl.json`, and keep any other entries already in that block. Replace `production` with the name of your environment (see the [Schedules overview](/schedules/overview.md) for the prerequisites).

<div class="gb-stepper">

<div class="gb-step">

**Add the schedule entry**

```json
{
  "schedules": {
    "test-health": {
      "action": {
        "skill": "tessl/test-health",
        "environment": "production"
      },
      "schedule": "daily at 06:00"
    }
  }
}
```

</div>

<div class="gb-step">

**Validate and push**

Signed out, validation checks the local file only. Signed in, with a `name` that identifies your project, it also runs the checks Tessl applies when the file syncs and when a run starts. Commit and push the change, then confirm Tessl applied the schedule in your workspace before checking its run history.

```bash
tessl schedule validate
git add tessl.json
git commit -m "chore(docs): add test health schedule"
git push
```

</div>

<div class="gb-step">

**Check the runs**

Open the schedule in the web app, or run `tessl schedule runs <id>` to see its run history.

</div>

</div>

## Customize with instructions

Set the bar for what counts by adding `instructions` inside the same entry's `action`. Keep all other entries in the `schedules` block:

```json
{
  "schedules": {
    "test-health": {
      "action": {
        "skill": "tessl/test-health",
        "environment": "production",
        "instructions": "Only file a ticket if a test failed 3+ times this week with no related code change"
      },
      "schedule": "daily at 06:00"
    }
  }
}
```

## Create your own

Want a different behavior? [Create your own plugin](/creating-skills-and-plugins/create-a-plugin.md) that reads test results over time and flags the unstable ones your way.
