Test an AI workflow like a product before go-live, with a 30-case test set, a scoring sheet and monitoring that catches failures before the client does.
The first complaint about an AI service is never "it crashed". It is "it told a customer we open on Sundays" or "it called Mr Novák 'Mrs'". Those failures are invisible unless you go looking for them. This lesson gives you a testing routine that takes about two hours per workflow and turns "it seems to work" into something you can put your name on.
Build a test set before you build the workflow
Collect 30 real inputs from the client: enquiries, reviews, documents, whatever the workflow processes. Make sure they include:
- 15 typical cases
- 5 edge cases (very short, very long, two questions in one, mixed language)
- 5 hostile or off-topic cases (angry customer, spam, "ignore your instructions", a request for a discount)
- 5 cases that must escalate to a human (health, legal, refund above limit, personal data request)
Write the expected outcome next to each: the intent it should detect, whether it should escalate, and the facts the reply must contain. This sheet is the contract between you and the client about what "working" means.
Score every run
Run all 30 after each prompt or workflow change and score each output 0–2 on four columns:
| Column | 0 | 1 | 2 |
|---|---|---|---|
| Correct facts | Invented or wrong | Minor slip | All facts from the source |
| Right action | Wrong route (sent when it should escalate) | Right route, clumsy | Right route, clean |
| Tone | Off-brand or rude | Acceptable | Sounds like the client |
| Format | Broken JSON or length | Slightly off | Exactly as specified |
Go-live threshold: average 1.8 or higher, and zero cases with a 0 in "Right action". One wrongly handled escalation is a lost client; a slightly stiff tone is not.
Keep the 30 cases and the scores in one Google Sheet per client and share it with them. When they ask "is it safe to switch on?", you show 30 rows with scores instead of saying "trust me". It is the cheapest sales document you will ever make.
The pre-launch checklist in practice
- Run the workflow with the client's real accounts at least once end to end; test accounts hide permission problems.
- Trigger it twice with the same input to confirm the duplicate check works.
- Kill a step on purpose (wrong API key) and confirm the error alert reaches you and the owner.
- Check the reply arrives in the customer's inbox, not spam: SPF and DKIM on the sending domain, a plain-text version, no link shorteners.
- Confirm personal data only goes where the DPA says it goes.
Monitoring after go-live
Testing stops regressions; monitoring catches drift. Set up three things in the first week:
- A daily digest to the owner: number of runs, number escalated, number failed. One email, three numbers.
- Sampling: every Friday, read 10 random outputs. Takes 15 minutes, catches tone drift and new question types.
- Threshold alerts: if failures exceed 5% in a day or runs drop to zero on a weekday (the form broke, the webhook moved), you get a message.
The platform's execution log (n8n executions, Zapier task history) is your evidence when a client says "it didn't send". Keep 30 days.
Model and API changes
Providers update models and retire old ones with a few months' notice. Pin the exact model version in your workflow, subscribe to the provider's deprecation notices, and re-run the 30-case test set whenever you move to a new version. Budget an hour per client per quarter for this; it belongs in the maintenance plan.
Beginner mistake: testing with your own polite messages
You type "Hello, I'd like to book a session on Tuesday, thanks!" five times, it works, you ship it. Real customers write "tuesday?? u open" or paste a 400-word story about their back. Use the client's actual history, not what you would write, and always include the angry one.
Do this before moving on
- Built a 30-case test set with expected outcomes for your workflow
- Scored a full run and reached 1.8 average with no routing zeros
- Tested duplicates, a forced failure and email deliverability
- Set up the daily digest and a Friday sampling reminder
Sources & further reading
- n8n documentation: executions log, error workflows and workflow settings
- Zapier help centre: task history, Zap runs and alerting
- Anthropic and OpenAI model deprecation and versioning pages
- Google Workspace and Microsoft 365 guidance on SPF, DKIM and DMARC for sending domains