·7 min read
How to Implement AI in QA (2026): A Practical Framework
Where AI helps in QA, where it lies, and the one rule that keeps AI tests trustworthy — the AI does the work, a fixed check decides. With a working example.

Published: · 5 min read
An AI model can change or vanish under your test suite overnight. The three-rule discipline — pin the version, keep a validated fallback, re-run the same suite on both — explained with the 19-day Fable 5 outage as the case study.
On this page
(Reviewer-only. Stripped by the publisher.)
modelName) — https://docs.stagehand.dev/v3/configuration/models. Stagehand 3.6 added claude-fable-5 support with documented Opus 4.8 refusal fallback (release @browserbasehq/stagehand@3.6.0). Verified: 2026-06-29 session + gh api 2026-07-06.body)Nineteen days. That is how long one of the world's best AI models was simply gone this summer.
Claude Fable 5 went offline on June 12 by government order. It came back on July 1. Between those dates, every test suite that leaned on it had a problem. Some teams fixed it in one line. Others lost days, twice.
The difference was not luck. It was whether they treated the model like what it is: a dependency.
Your test suite already has dependencies. A database version. A browser version. A Node version. You pin them all. (Pinning means locking the exact version so nothing upgrades by itself.)
An AI model is the same kind of moving part, with three extra ways to hurt you:
A test that stands on a part like this, unpinned and unwatched, is not a test. It is a hope.
Never let a test suite float on "latest" or on a bare model family name. Point it at the exact model ID, in one place.
// config/models.ts — ONE place the whole suite imports from
export const MODELS = {
primary: "claude-fable-5", // pinned: the exact ID we validated
fallback: "claude-opus-4-8", // pinned: the exact ID we validated
} as const;
Every agent, every AI-assisted test imports from this file. Nothing names a model directly. When the world changes, you edit one line, not forty files.
If you use an agent framework, the same rule applies to its config. In Stagehand, for example, the model is an explicit setting — set it, do not rely on an implicit choice:
const stagehand = new Stagehand({
modelName: MODELS.primary, // never omit this
});
A fallback you pick during the outage is not a fallback. It is a gamble made under pressure.
Pick the second model now, on a calm day. The bar is simple: it must run your real suite acceptably. Not "it is a good model" — your suite, green, at a cost you accept.
Write it into the same config file (see MODELS.fallback above). One line to switch, pre-approved, pre-tested.
This is the rule most teams skip, and it is the one that makes the other two real.
A fallback is only valid while it stays valid. Models drift. So, on a schedule, run your same test suite against both models and compare:
// parity.spec.ts — the same checks, both brains
for (const model of [MODELS.primary, MODELS.fallback]) {
test(`checkout flow passes on ${model}`, async () => {
const agent = makeAgent(model);
await agent.run("complete checkout for the seeded cart");
// The fixed check the agent cannot move — same for both models:
expect(await getOrderTotal()).toBe(41.97);
});
}
Two details carry this pattern:
When Fable 5 went dark, the pinned teams with a validated fallback did this: change one line, run the suite, ship. When it came back July 1, they did it again in reverse. Two boring mornings.
The floating teams debugged broken builds twice in three weeks — once out, once back. Same event, same tools. The whole difference was written before the crisis: one config file, one spare model, one recurring suite.
You would not float your database version in production. Your AI model earns the same respect — it is infrastructure now, and this summer proved it can vanish like infrastructure too.
Anton Gulin is the AI QA Architect — the first person to claim this title on LinkedIn. He builds AI-powered test automation systems where AI agents and human engineers collaborate on quality. Former Apple SDET (Apple.com / Apple Card pre-release testing). Find him at anton.qa or on LinkedIn.
Get notified when I publish something new, and unsubscribe at any time.
·7 min read
Where AI helps in QA, where it lies, and the one rule that keeps AI tests trustworthy — the AI does the work, a fixed check decides. With a working example.

·7 min read
Playwright 1.61 added a virtual authenticator. You can now test passkey login with no hardware key, in every browser. Here is a complete working test.

·8 min read
The 10 Playwright best practices for stable tests in 2026, and the ones AI code agents like Copilot and Cursor get wrong.
