In short: a test suite for an AI agent is the set of cases you run before every release, organised so the results mean something. Each case needs five parts: the task in plain words, the seed data, the expected end state, a pass rule, and tags for risk and run tier. Group cases into tiers (smoke, release, full), run each case more than once, confirm failures on a rerun before you call them regressions, and keep the expected states up to date when the business rules change. Count coverage as actions times error types, not as a number of cases.
If you need ideas for individual cases, start with 12 AI agent test case examples. If you need the sandbox, seed data and reset, see AI agent test environment. This guide is the part in between: how to turn cases and an environment into a suite you can trust before a release.
What goes into one test case?
A case that only says "create a purchase order for 10 units" can't fail in a useful way. Give every case the same five parts:
| Part | What it holds | Example (illustrative) |
|---|---|---|
| Task | The request, in plain words, as a user or system would send it | "Order 10 boxes of A4 paper from our usual supplier" |
| Seed | The records that must exist before the run | Supplier with a default price list; paper item with unit "box" |
| Expected end state | The records that should exist after the run | One PO, one line, 10 boxes, price from the list, status "pending approval" |
| Pass rule | What has to match, and what must not change | Exactly one PO; unit is box, not piece; no other PO touched |
| Tags | Risk, action, error type, tier | write, units, smoke |
The expected end state is the part teams skip, and it is the part that turns a case into a test. Without it, a reviewer reads the agent's reply and decides by feel.
How do you decide which cases go in the suite?
Build a grid. Rows are the actions your agent can take that change something: create an order, update a contact, issue a refund, send an email. Columns are error types:
- wrong data: right record, wrong values;
- duplicate writes after a retry;
- hallucinated success: "done" with no record behind it;
- partial writes: some steps saved, some not;
- missed approvals and permission overreach;
- misleading input and prompt injection;
- requests where the right answer is to write nothing.
Each filled cell is at least one case. Empty cells are your known gaps, and you can see them before a release instead of after. Fill the cells for the expensive actions first: money, customer-facing messages, records other teams depend on.
How should the suite be split into tiers?
Not every case needs to run on every change. Three tiers keep the suite fast enough to use:
| Tier | What's in it | When it runs |
|---|---|---|
| Smoke | One happy path per write action | On every change to the agent |
| Release | The smoke tier plus failure cases, refusals and the high-risk cells of the grid | Before every release |
| Full | All cases, including rare paths and long workflows | On a schedule, and after a model or system change |
The release tier is what a release gate runs. For a quick pre-release set, see smoke tests for AI agents.
How do you handle results that change between runs?
An agent can pass a case on one run and fail it on the next with the same input. A Princeton study of 15 models (Rabanser et al., 2026) found that reliability, including consistency across runs, improved little as accuracy rose, and argues for repeated runs rather than a single success rate. Build that into the suite:
- Run each release-tier case more than once. Record how many runs passed, not just the last one.
- Decide the pass rule per case. For a payment, every run must pass. For a low-risk lookup, you may accept a lower rate, as long as you write the rule down before the run.
- Confirm before you call it a regression. Rerun a failed case. If it fails again, it is a regression; if it passes, list it as unconfirmed and look at the pattern later.
- Reset the seed between runs. A run that leaves a record behind changes the next run's starting point.
Should the suite check the path or only the end state?
Mostly the end state, plus the steps that rules require. In CXBench (Yu et al., October 2026), seven models ran 120 regulated customer-service tasks. 55.5% of 840 runs reached the right final state but failed a required step, such as a disclosure or a consent check: that was 80.1% of the runs that passed on outcome alone. Only 13.8% passed both.
For your suite, that means two kinds of pass rule: the records are right, and the steps that policy requires happened. Don't assert the exact order of every call; a valid run can take a different path.
How do you keep the suite from going stale?
A suite that nobody updates starts failing for the wrong reasons, and then people stop reading it.
- Version expected states with the business rules. When the approval limit changes, the cases that depend on it change in the same edit.
- Give each case an owner. The person who knows the process decides whether a failure is a bug in the agent or an out-of-date case.
- Add a case for every production incident. Write it with the exact input and the expected end state, so the same error can't ship twice.
- Retire cases on purpose. If an action is removed, remove its cases; don't leave them skipped.
- Re-run after outside changes. Model updates and changes to the connected system can break cases that used to pass. See model update broke your AI agent and customer system changed.
What should a suite report?
One line per case: passed, failed, or unconfirmed, with the number of passing runs. For each failure, the expected and the actual record side by side, plus the trace. Then one decision for the release: ship, or hold and look at the confirmed failures. A report that only says "87% passed" doesn't tell anyone which customer record would have been wrong.
How Agentiqa fits
Agentiqa is an AI Quality System for production AI agents. With Agentiqa, you describe each task in plain words. When you rerun the failed tasks, AI Quality Manager reports a step as a regression only if it fails again. Unconfirmed failures are listed separately.
First release gates are live within 7 minutes; for enterprise teams, an Agentiqa engineer sets up the gates on the riskiest tasks over a 3-day rollout.
FAQ
What is an AI agent test suite?
The set of test cases an AI agent has to pass before a release, each with a task, seed data, an expected end state and a pass rule, grouped into tiers that run at different times.
Is a test suite the same as an eval dataset?
No. An eval dataset scores outputs, sometimes with mocked tools. A test suite runs tasks against a test copy of the real systems and checks the records. You can use both; see AI agent evals vs testing.
How many test cases does an AI agent need?
There is no fixed number. Count filled cells in the actions-by-error-types grid, and make sure the high-risk actions have every column covered.
How do I handle flaky AI agent tests?
Run the case more than once, record the pass count, and only call a failure a regression when it fails again on a rerun. If a case flips without any change, check the seed and reset first.
What framework should I use for an AI agent test suite?
Use whatever runs your agent against a test environment and reads back the records. The structure of the cases matters more than the tool: task, seed, expected end state, pass rule, tags.
Who should write the expected end states?
The people who own the business process, with the engineers who own the agent. The process owner knows what "right" looks like in the record.
Sources
- Rabanser, Kapoor, Kirgis, Liu, Utpala and Narayanan (Princeton University), "Towards a Science of AI Agent Reliability", February 2026. arXiv:2602.16666. 15 models on two benchmarks; twelve reliability metrics; reliability improved little as accuracy rose. Read 21 November 2026.
- Yu, Zhang, Su et al. (Lero, University of Limerick; Genesys and others), "cxbench: A Benchmark for Process-Compliant LLM Agents in Regulated Customer-Experience Workflows", October 2026. arXiv:2610.25954. Seven models, 120 tasks, 840 runs; 55.5% false-passes (80.1% of outcome-passing runs); 13.8% passed both outcome and process. Read 21 November 2026.
Testing your own agent? Start free with the Agentiqa Community Edition: 20 runs a month, no credit card. Plans are on the pricing page.
