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

# Test Suite

## Validate email categorizations, data extractions, and downstream actions before they touch production traffic.

The ERM Test Suite is the QA layer for your Email Reply Management workflows. Use it to verify that incoming replies are categorized correctly, that the right fields are extracted, and that your skills behave as expected, before any of it runs against live inbound mail.

Every workspace ships with a baseline suite covering the out-of-the-box categorizations. From there, you can layer in custom tests for the scenarios the baseline doesn't cover: edge cases, custom skills your team has built, or regression checks for categorizations you've previously seen drift.

<Tip>
  Treat the suite like a smart campaign QA checklist. Add a test the first time you encounter an edge case in production; that way the next time something similar comes through, you'll catch it pre-deploy instead of in the inbox.
</Tip>

## When to use the test suite

* **Before (or after) promoting a new skill to production.** Confirm that any new or modified categorization handles your common reply patterns.
* **After a model or prompt change.** Re-run the full suite to surface regressions in previously passing categorizations.
* **When debugging a misclassification.** Reproduce the offending email as a test case, then iterate against it without touching live data.
* **As part of a recurring health check.** Run the suite on a cadence to catch drift in OOTB categorizations.

## Test suite overview

The landing page surfaces the state of every test in your workspace and lets you slice the list by status or categorization

<Frame>
  <video autoPlay muted loop src="https://mintcdn.com/allgoodtechnologyinc/_uY4Rp9H6WifzyjT/videos/Test-Suite-Cards.mp4?fit=max&auto=format&n=_uY4Rp9H6WifzyjT&q=85&s=a99f64f61b8fff88b137bc551f5f6625" controls data-path="videos/Test-Suite-Cards.mp4" />
</Frame>

<CardGroup cols={2} />

### Filters

Narrow the list down to what you're working on:

<Frame>
  <video autoPlay muted loop src="https://mintcdn.com/allgoodtechnologyinc/_uY4Rp9H6WifzyjT/videos/Test-Suite-Filters-1.mp4?fit=max&auto=format&n=_uY4Rp9H6WifzyjT&q=85&s=a2adea11e86e7a9c2dd0da1343e324ac" controls data-path="videos/Test-Suite-Filters-1.mp4" />
</Frame>

### Test list columns

| Column                | What it shows                                                                                                        |
| --------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **Name**              | The label you gave the test. Use a convention that scales (e.g. `OOO – multi-day absence`, `Bounce – mailbox full`). |
| **Expected category** | The categorization the test asserts against.                                                                         |
| **Checks**            | Whether the test asserts categorization only, or also validates extracted fields.                                    |
| **Status**            | Pass / fail indicator from the most recent run.                                                                      |

## Creating a test

<Steps>
  <Step title="Click + New Test">
    Open the test creation form from the test suite landing page.

    <Frame>
      <video autoPlay muted loop src="https://mintcdn.com/allgoodtechnologyinc/_uY4Rp9H6WifzyjT/videos/Test-Suite-Step-1-2.mp4?fit=max&auto=format&n=_uY4Rp9H6WifzyjT&q=85&s=97d240489353f277de6f1ddd47a254a1" controls data-path="videos/Test-Suite-Step-1-2.mp4" />
    </Frame>
  </Step>

  <Step title="Name the test and paste the reply body">
    Give the test a descriptive, scannable name and paste the email body you want the system to evaluate. Treat the body the way it will arrive in production — keep signatures, quoted history, and formatting intact if those are part of what makes the case representative.

    <Frame>
      <video autoPlay muted loop src="https://mintcdn.com/allgoodtechnologyinc/_uY4Rp9H6WifzyjT/videos/Test-Suite-Step-2.mp4?fit=max&auto=format&n=_uY4Rp9H6WifzyjT&q=85&s=801e869dae15206cc5217cdeb2f306fa" controls data-path="videos/Test-Suite-Step-2.mp4" />
    </Frame>
  </Step>

  <Step title="Add sender, recipient, alias and subject (optional)">
    These fields are optional, but they're worth filling in when the categorization could plausibly depend on them — for example, when an alias is part of the routing logic or when the sender domain is a signal.

    The subject does affect classification. If you're testing a category where the subject is a strong signal (auto-replies, bounces, "Re:" threading), set it explicitly.

    <Note>
      Want to confirm a categorization is robust? Duplicate the test with the same body but different subjects. If results diverge, you've found a fragility worth flagging.
    </Note>

    <Frame>
      <video autoPlay muted loop src="https://mintcdn.com/allgoodtechnologyinc/_uY4Rp9H6WifzyjT/videos/Test-Suite-Step-3-1.mp4?fit=max&auto=format&n=_uY4Rp9H6WifzyjT&q=85&s=f4afcd52accd974451404ec58a7b32fe" controls data-path="videos/Test-Suite-Step-3-1.mp4" />
    </Frame>
  </Step>

  <Step title="Set expected category and add extraction checks (if your skill extracts data)">
    For skills that pull structured data out of replies, add one check per field you want to validate:

    * **Field name** — the extracted field you're asserting against
    * **Expected value** — the value you expect to be returned
    * **Comparison type** — `Exact` or `Semantic`

    <Tip>
      **Exact** matches the expected value verbatim against what was extracted. Use it for structured values where wording is stable — dates, dollar amounts, order numbers, statuses.

      **Semantic** matches on meaning rather than wording. Use it for free-text fields where the model may paraphrase — reasons, intents, summarized requests. A semantic check on `reason = "out of office"` will pass on `"away from the office until Monday"`.
    </Tip>

    <Frame>
      <video autoPlay muted loop src="https://mintcdn.com/allgoodtechnologyinc/_uY4Rp9H6WifzyjT/videos/Test-Suite-Step-4-1.mp4?fit=max&auto=format&n=_uY4Rp9H6WifzyjT&q=85&s=ad6e972eea827681d572a06b9da1334e" controls data-path="videos/Test-Suite-Step-4-1.mp4" />
    </Frame>
  </Step>

  <Step title="Save and run">
    Save the test, then execute it from one of two places:

    * **Run All Tests** at the top of the suite — useful after a model change or before a release
    * The **Run** button on the test row — useful while iterating on a single case

    <Frame>
      <video autoPlay muted loop src="https://mintcdn.com/allgoodtechnologyinc/_uY4Rp9H6WifzyjT/videos/Test-Suite-Step-5.mp4?fit=max&auto=format&n=_uY4Rp9H6WifzyjT&q=85&s=4c4e188431458ad5494fe41db804ea82" controls data-path="videos/Test-Suite-Step-5.mp4" />
    </Frame>
  </Step>

  <Step title="Click into your tests">
    Review your tests by clicking into them. Edit, Rerun, Debug and Delete Tests.

    <Frame>
      <video autoPlay muted loop src="https://mintcdn.com/allgoodtechnologyinc/_uY4Rp9H6WifzyjT/videos/Test-Suite-Step-6-1.mp4?fit=max&auto=format&n=_uY4Rp9H6WifzyjT&q=85&s=c0eb82d7b6580889e456aa569552dd11" controls data-path="videos/Test-Suite-Step-6-1.mp4" />
    </Frame>
  </Step>
</Steps>

## Best practices

* **One assertion per test where possible.** If a test fails, you want to know exactly which behavior broke. Bundling six extraction checks into one case makes triage harder.
* **Mirror production inputs.** Real replies have signatures, disclaimers, and forwarded threads. Stripping them out makes tests pass that wouldn't pass in the wild.
* **Cover the negatives.** Don't only test the categories you expect to hit — test cases that *shouldn't* match a category to make sure the skill isn't over-firing.
* **Re-run after every change.** Treat the suite as your release gate: prompt edits, skill changes, and new categorizations should all be followed by a full run.
