# Agent regression testing

Agent regression testing is the practice of proving, before a change ships, that an agent still
does what it did, and repairing it when it does not. A change can be a prompt edit, a model swap,
a tool or schema change, or a harness change, and any of them can shift behavior nobody meant to
touch.

It exists because agents change often and fail quietly. A one-line prompt edit can fix the case
it was written for and break three others, and the broken output still reads fluently, so nobody
notices until users do.

The method is a suite of cases drawn from what the agent is supposed to do, run against the old
version and the new one. Agent output is not deterministic, so each case runs several times, and
a test passes on a rate over those runs, not on one run. The suite checks the steps as well as
the answer: which tools were called, with which arguments, in which order. A threshold per case
turns those rates into a pass or a fail, and running the suite in CI blocks a change that falls
below it. When a case fails, the fix is a change to the prompt, the tool, or the code, followed by
a rerun of the whole suite, because a fix for one case can break another.

A suite covers only the cases someone wrote down, so it misses failures nobody predicted.
Regression testing covers the method (the suite before a change, repeat runs, thresholds, CI, and
the fix), and what counts as a regression after a deploy belongs to regression detection.

## Questions answered under this concept

- [How do I regression test tool calls, not just the final answer?](https://tessary.ai/answers/agent-regression-testing/how-do-i-regression-test-tool-calls-not-just-the-final-answer)
- [What's the difference between LLM regression testing and agent regression testing?](https://tessary.ai/answers/agent-regression-testing/whats-the-difference-between-llm-regression-testing-and-agent-regression-testing)

---

Source: https://tessary.ai/answers/agent-regression-testing
All concepts: https://tessary.ai/answers
From Tessary, agent reliability for AI agents in production: https://tessary.ai
