Back to blog
agents-ia
November 5, 2026
9 min read

AI agents: test your workflow before it breaks everything

You can't test an AI agent like conventional software. Here's how to scope the workflow tightly, replay real cases and keep a human in charge of anything irreversible.

Vincent

Vincent

AI expert, AI First

You can't test an AI agent like regular software. A method for SMBs: scope the workflow, replay real cases, log tool calls and stay in control.

Testing an AI agent in a workflow means replaying real cases at every step where it makes a decision or takes an action, before it gets anywhere near your email, your CRM or your invoices. An AI agent is a system that relies on a language model to plan actions and call tools. That's why its behaviour can change from one run to the next.

When I train small businesses on Claude Code, the workflow that fails is almost never the badly written one. It's the one nobody ever ran against awkward edge cases. Below is the method I use, followed by my verdict on the agents that claim they can do this testing for you.

  • 🎯 Probabilistic testing: the same case can trigger different tool calls from one run to the next.
  • 🏗️ Tightly scoped workflow: the agent only makes decisions at the steps where judgement matters.
  • 📊 Real cases, replayed: around thirty genuine emails or files, rerun every time the prompt changes.
  • ⚠️ A human on anything irreversible: sending, paying and deleting stay under human sign-off until proven otherwise.

Why you can't test an AI agent like conventional software

You can't test an AI agent like conventional software because its behaviour is probabilistic. The same prompt can trigger different sequences of tool calls from one run to the next. According to IBM's guide to AI agent testing, published on June 25, 2026, an error made early in a multi-step workflow may not show up until much later. A test that passes once proves almost nothing.

The gap between ambition and readiness has been measured. The IBM Institute for Business Value, cited in the same guide, found that 80% of the CIOs and CTOs it surveyed report AI transformation mandates coming from their CEO. Only 11% say they are fully ready for the agent deployments planned for the following year.

The risk is real. In June 2025, Gartner predicted that more than 40% of agentic AI projects would be scrapped by the end of 2027 because of rising costs, unclear business value and inadequate risk controls. I read that third reason as an admission: companies are plugging agents into live systems without ever putting them through their paces.

How is an AI agent different from a simple automation script?

An automation script gives the same output for the same input, while an AI agent chooses its actions based on what it observes. Tricentis, a testing-tools vendor, draws the distinction in its tutorial on testing AI agents: a chatbot answers, while an agent works towards a goal by searching the web, querying a database or running code.

That ability to act is what makes testing harder. Tricentis describes an agent that misreads its goal, takes several wrong actions in a row without flagging anything, then presents the result as though everything went fine. The failure is in the reasoning, not the code. The integration works and the agent runs, but the answer is wrong.

An agent's worst failure is the one that looks like a success.

Take a mail-triage workflow. The agent reads a message, classifies it, updates the CRM, then drafts a reply. If the classification in step one is wrong, step four produces a reply that is polite, well written and completely off the point. There's no error message and no alert.

Fixed workflow or free agent: what should you test first?

A workflow is a sequence of steps decided in advance, whereas an AI agent picks its own next action based on what it observes. That difference sets your testing strategy. A known path can be checked step by step, while an improvised path is mostly judged on its outcomes and its limits.

A user on r/Romain_Helias_IA explains it with a restaurant metaphor. The pizza on the menu follows a recipe with its variations planned in advance: that's the workflow. The vegetarian meal improvised from whatever is left in the store room needs a cook who checks the stock and then picks an alternative: that's the agent.

They add a point many business owners miss. A workflow can include an AI step, such as summarising a form or classifying a request, without becoming an agent. And because the path is known, you can test it, see where it fails and fix that specific step. It's a single opinion, posted without a single comment, but it matches what I see in the small businesses I work with.

My position is firm: most small-business needs call for a workflow with one AI step, not a free-roaming agent. An agent that reliably handles one specific task beats a general-purpose agent that dazzles in a demo. A business owner can realistically test a tightly scoped workflow. Testing a free agent takes a setup that few small businesses will keep running.

How do you decide which steps to hand over to an AI agent?

Three questions are enough to sort your steps:

  • Does the step receive inputs too varied for fixed rules (free-form emails, mixed documents)?
  • Can a mistake be undone? A draft can be corrected, a bank transfer can't.
  • Can the result be checked in a few seconds (a category, an amount, a date)?

Three "yeses" mark a step as a candidate for an agent. Otherwise, a fixed rule or human sign-off will do a better job, and it will be cheaper to test.

How to build tests for an AI agent without a QA team

To test an AI agent in a small business, you need three things: a set of real cases replayed after every change, a log of every tool call, and human approval for irreversible actions. Tricentis sums up the foundation for professional teams as reference datasets, workflow tracing, simulations and tool-call validation, backed by human review, automated evaluations, regression tracking and security testing.

A small business doesn't need all of that on day one. It needs the smallest setup that catches the costly mistakes, and one habit: no change to a prompt, model or tool goes into production until the reference cases have been replayed.

Which real cases should you replay?

I recommend around thirty cases taken from your real emails or files, split into three groups. Everyday cases that reflect your normal workload. Awkward cases: an ambiguous message, a missing attachment, an angry customer. Off-limits cases, where the right response is to refuse or escalate to a human.

Add some booby-trapped messages with hidden instructions, because an agent that reads your email also reads whatever your adversaries slip into it. My article on Claude and prompt injection explains why a 1% failure rate is still too high once an agent can act.

How do you track what the agent does at each step?

You need a log that records, for every run, the input, the tool called, its parameters and the final decision. A market is forming around this need. A post on r/startupsArgentina pitches Mibo-ai, a product for viewing traces, spotting failures and running evaluations on agents, with two months of free access in exchange for feedback. It's a sales pitch with no user feedback so far. It shows the demand exists, not that the tool delivers.

A more telling example comes from r/aigamedev. A solo developer reports that on October 28, 2026, they released the Steam demo of a 12-chapter shooter whose code was written by Claude Code agents: 3,929 commits in 20 working days, in Godot 4.7. Every code merge has to pass a headless test suite: zero script errors, a bot that plays through the level, plus navigation and geometry checks.

What the tests don't cover is just as instructive. The same developer explains that the agents can't tell what's fun. The demo level went through four versions, and a playtest with real players led to a whole new section being added. Automated tests protect the mechanics; humans keep the value judgements.

Test level What you check Minimum tool for an SMB When to rerun
Reference cases Correct answer on around thirty real cases Spreadsheet and human review Every prompt or model change
Tool calls Right tool, right parameters, right order Workflow execution log Every run
Simulation Behaviour on awkward cases and requests to refuse Test copy of the CRM or mailbox Before going live
Human review Irreversible actions (sending, paying, deleting) Approval before sending Until the error rate is stable
Security Resistance to instructions hidden in a message Booby-trapped emails added to the test set Every quarter

SOURCE: Tricentis, IBM, author's synthesis · UPDATED 11/2026

Do you need an AI agent to test your own software?

An AI testing agent interprets test instructions, uses the application the way a person would and returns a verdict with evidence. On the blog La taverne du testeur, Bruno Legeard described "computer-use" or GUI agents in January 2026. They open a browser, fill in fields and read the screen to follow their plan, then deliver a step-by-step report with screenshots. Their capabilities improved very quickly in 2025.

There are already products on the market. In December 2025, all4test listed five software-testing agents (Momentic, Spur, testRigor, Yest and qTest) and claimed up to 70% less time spent designing tests, 50 to 80% more coverage and 25 to 50% lower QA costs. Those figures come from "market feedback", with no independent study cited, so I treat them as marketing claims, not benchmarks.

How do you check a testing agent before you trust it?

You test the tester. My method is to plant three to five known bugs in a test build of the application, then see which ones the agent catches. A testing agent that reports nothing doesn't prove your application is sound. It may only prove the agent can't see anything.

The testomat.io guide, updated in August 2026, recommends reviewing the results, correcting false positives and keeping a human in the loop for the context the model misses. I agree, with one caveat: if your team already has a stable Playwright or Selenium suite, keep it for deterministic checks. A testing agent does better on user journeys that change often. The classic suite is better for whatever stays put.

Verdict: when to let an AI agent act alone in your workflow

Yes, you should test your AI agent's workflow before it goes into production, and the rule comes down to three conditions: reference cases passed, actions logged, and a human on everything irreversible. Until all three are in place, the agent stays supervised. That answers the question from the start of this article. Agent-based testing tools help with repetitive regression testing, but they replace neither your real cases nor your own review.

"The challenge now is scaling AI systems that run continuously and autonomously, often on governance models and architectures designed for a far slower and more predictable environment."

Matt Lyteson, CIO of IBM, June 2026

Matt Lyteson's point explains why supervision isn't a brake. Your current processes were designed for slow, predictable humans. A fast, variable agent will cause damage in them if it isn't kept on a leash. My article on who supervises when the agent acts alone covers the roles you need to plan for.

What criteria should you use to move from supervision to autonomy?

I lift supervision one step at a time, never all at once. An agent earns autonomy on an action once three conditions are met. It has passed every reference case since the last change. Its log has shown no unexpected tool calls for several weeks. And if a mistake does happen, it can be fixed in minutes. External sends and payments stay under approval far longer than internal classification.

This gradual approach reflects my core belief: useful AI projects start small, on one measurable use case, and expand as the evidence builds up. I described what that looks like in practice in my client reports automated with Claude agents, including what went wrong. If you'd like to learn to build these workflows yourself, the French-language Claude Code course for non-developers starts from real-world cases and ends with a published showcase website.

Frequently asked questions

What does testing an AI agent involve?

Testing an AI agent means checking that it reaches its goal reliably, safely and in line with company rules before it's deployed. Because the agent plans, calls tools and can behave differently from one run to the next, testing looks at sets of cases and at the record of its actions, not at a single successful try.

How many test cases do you need before going live?

None of the sources I consulted set an official threshold. I start with around thirty real cases for a small-business workflow, split between everyday cases, awkward cases and cases to refuse. Then I add a new one every time an error shows up in production. The test set grows with real failures.

Can an AI agent test software instead of a human?

An AI testing agent can run through user journeys, return a verdict and provide screenshots, which lightens the load of repetitive regression testing. It doesn't judge whether the experience is any good, and it can miss anomalies. That's why it pays to plant known bugs and measure what it catches. A human is still needed to review false positives.

What's the difference between a workflow and an AI agent?

A workflow follows steps planned in advance, even if one of them uses an AI model to summarise or classify. An agent decides its next action itself, based on what it observes, within the limits you set. A workflow is tested step by step. An agent is tested mainly on its results and its refusals.

Do you need a specialist tool to trace an AI agent?

Not to get started. On a tightly scoped workflow, a log that records the input, the tool called, its parameters and the final decision is enough, kept in a spreadsheet or a simple database. Tracing platforms like the ones Tricentis describes become useful once the number of runs makes manual review impossible.

Discussions Reddit

Articles & ressources

Take action with AI First

Let our developers build your website, application or automation with Claude, from brief to delivery.

Tell us about your project →

More articles