|
AI×QA #1 : Why AI won’t replace testers… it’ll replace bad testing |
I hear this a lot: “AI will replace testers.”
AI won’t replace good testers. It’ll replace bad testing: flaky checks, checklist theater, and copy-paste cases that never catch the bugs that matter. Good testing is still about risk, feedback, and judgment. That’s human. AI’s edge is speed and pattern-spotting. Together, they ship faster releases with fewer escapes.
What AI is genuinely good at
- Spec → draft scenarios: Feed PRDs/Jira in, get clean Given/When/Then skeletons + edge-case suggestions. You review, tighten oracles, and approve.
- Git diff → smart runs: Map changed files to relevant tests via embeddings/coverage. Run fewer tests with more coverage where it matters.
- Self-healing locators: Prefer role/ARIA/labels, let an ML repair loop propose safe replacements when DOMs wiggle—with confidence scores and a diff log.
- Synthetic data with constraints: Generate PII-safe data for nasty boundary/negative paths without dragging prod dumps everywhere.
- Flake hunters: Look at retry history, duration variance, timeouts, and code churn to flag likely flakes before they waste CI minutes.
- Telemetry-driven focus: Cluster real user journeys and error spikes so we test hot paths, not just what we imagined.
Payoff: less noise, more signal—and a test suite that evolves as the product does.
Where AI disappoints (without guardrails)
- Oracles: It doesn’t know if a tax, price, or SLA is correct. Give it a source of truth (API specs, rules tables) or expect confident nonsense.
- Ambiguity: Vague requirements in → vague tests out. Tighten acceptance criteria first.
- Security/perf: Needs hard limits, fixtures, and harnesses. Hallucinations are hazards; sandbox everything.
- Secrets/PII: Never put tokens or user data in prompts. Keep catalogs/auth in code, not chats.
- Context starvation: If it can’t see selectors, APIs, or fixtures, it will guess. Don’t let it.
The Tester’s new job description
- QA Risk Analyst: Generally would look at four clues for each module—how many people use it, how recently the code changed, how tricky it is, and how many bugs it had. Turn that into a color map (green = safer, red = risky) and test the red parts first. Example: Checkout (heavy use + recent changes + past bugs) = red → run full + negative tests. Profile settings (low use, stable code) = green → light checks or nightly.
- Prompt-QA: It’s the way we need to talk to AI using fixed, reusable prompts so it gives consistent results. Generally I use 2–3 fill-in-the-blank prompts (e.g., “From this ticket, write 3 BDD scenarios + step stubs”). The prompt forces AI to use my selector list (UI element names like “Email”, “Sign in”) and my API list (endpoints/headers)—if something isn’t listed, it must write TODO, not guess. Result: grounded drafts I can trust and finish fast—no random XPaths or made-up APIs.
- Data-QA: Make fake-but-realistic test data that follows rules (valid emails, age ≥ 18, correct tax math), looks real, covers common + edge/error cases, and never uses real user’s data. AI task: “Generate 50 orders under these rules, add 10 edge cases, label each row valid/invalid with a reason, and replace real names with fakes.” Result: a ready-made CSV/JSON that hits the tricky corners without exposing anyone’s data. Let AI do the heavy lifting: auto-generate and label examples, scrub PII, and point out gaps you’ve missed.
- QA Tooling Lead : Set up CI so the right tests run first and flaky ones don’t slow you down. A small AI/logic ranks tests per PR (files changed, churn, traffic, past bugs); suspected flakes go to a side lane (retry + auto-ticket). Map code/Jira changes to matching scenarios to run fewer tests with more coverage; AI skims logs to tag likely root causes. Add guardrails: block unknown selectors/APIs, fail on secrets in logs, and warn when a test gets too slow or too flaky.
- Product partner: Ask, “If this breaks, what hurts most?” and turn that into clear pass/fail rules (oracles) and release stoplights (gates)—e.g., Oracle: account balance never negative after any operation. Gate: block on any negative value. AI helps fetch rules from requirements, draft tests, and flag risky areas or metric spikes—but AI doesn’t set the bar. You decide what matters and when to block a release.
Anti-patterns AI will gladly replace (and should)
- Zombie suites that run everything, always.
- sleep(5) as a “strategy.”
- Steps that map to no business risk.
- Tests no one can explain or fix.
- Manual log-trawling to spot obvious anomalies.
Replace them with risk-led, registry–based, AI-accelerated testing—and you future-proof your craft.
Tiny example: Instead of running 1,000 UI tests every PR, you:
- build a risk heatmap → pick top 50 tests,
- pull selectors/APIs from your registry(no guesses),
- use AI to draft missing scenarios + data, which you review. Result: faster CI, fewer flakes, and coverage where it counts.
Parting thought
AI won’t replace testers. It will amplify the testers who measure risk, write clear pass/fail rules, wire good tools, and say no to noise. That’s the bar for AI×QA—and the theme for this series.
If this resonates, hit reply with your #1 QA pain (flaky UI? impact analysis? data chaos?). I’ll try to cover the most common one in my upcoming newsletter.
|
|
|
|