Skip to content
guidePhase: VerifyQualityGuide 5 of 16

Roles: qa · developer

Guide: Automated Testing & QA ​

Decision: What to automate, what stays human, and how AI fits the test pyramid.

Related: qa-guardrails.md · SOP-005


Clarifying "no manual QA" ​

This model means no manual test execution in a QA phase. Humans still:

  • Review test design in PRs
  • Accept staging behavior (PO demo + green synthetics)
  • Triage production alerts

Pyramid layers — options ​

LayerCommon toolsAutomate?Human role
Unitpytest, jest, go testYesReview edge cases in PR
ContractSchemathesis, Pact, DreddYesApprove spec changes
IntegrationTestcontainers, LocalStackYesMaintain fixture policy
E2EPlaywright, Cypress headlessYesReview flaky test fixes
MutationStryker, mutmutYes (nightly/release)Set tier thresholds
Property-basedHypothesis, fast-checkSelectiveChoose critical domains
Loadk6, ArtilleryPre-release / continuousDefine SLO targets

AI-generated tests ​

ApproachProsCons
AI from OpenAPIFast; aligned to contractMisses domain invariants
AI from codeMatches current behaviorPitfall: locks in bugs
AI maintenance on spec diffKeeps suite currentNeeds human review of diffs
AI from incident postmortemCloses prod gapsOne-off unless wired to SOP

Recommended: Generate from spec + ADR context; human approves in PR.


Staging validation alternatives ​

ApproachProsCons
PO demo + green metricsFast; product-focusedSubjective without synthetics
Synthetic canaries onlyObjectiveMay miss UX gaps
Manual exploratory (timed)Finds odd pathsDoesn't scale; contradicts pure automation

Recommended: Synthetics + PO acceptance on staging for user-facing T1/T2 — not a manual regression script.


Pitfalls ​

PitfallWhy it hurtsMitigation
E2E-only strategySlow CI; flakyPyramid balance
Flaky tests ignoredAlert fatigue; real bugs missedQuarantine + fix SLA
100% line coverage obsessionFalse confidenceMutation score on T1
AI tests never reviewedNonsense assertions mergeReviewer checklist
No contract testsSpec drift undetectedSchemathesis in CI
Skipping integration tests"Works on my machine"Ephemeral env or Testcontainers
Manual regression before releaseBottleneck; unreproducibleAutomate path or drop it
Tier 1 without mutation gateWeak tests passTier-based CI policy

Unit + contract on every PR → integration for DB/queue paths → E2E for critical journeys → mutation nightly for T1 → AI generates from OpenAPI with human PR review.


Reference template only — no production code. Adapt in your own project.