Quality Assurance

Quality assurance is the system that makes “we meant to” into “we would have caught that.” Testing is a subset. QA also includes the definition of done, who can release, and how production tells you the definition was a lie.

The pyramid, used honestly

  • Unit: fast, deterministic, no I/O. Domain rules and parsers live here.
  • Integration: your code plus a real collaborator (testcontainers Postgres, HTTP to a stub). This is where ORMs and SQL actually fail.
  • End-to-end: few, expensive, closest to the user. See E2E frameworks.

Invert the pyramid (mostly UI tests) and you wait 40 minutes to learn a null check is missing.

Shift left without dumping it on QA

Engineers own automated checks in the same PR as the code. QA owns risk: charters for exploratory testing, production-like data, “what did we not think of.” A QA department that only clicks the happy path after freeze is a queue, not a quality system.

Release quality

  • CI red means do not merge. Flakes are defects in the suite.
  • Feature flags beat giant-bang releases.
  • You need a rollback or forward-fix path before you need it.

Example

A pricing rule has a unit test for the numbers, and one end-to-end test walks through checkout.

What breaks it

The only check is a 40-minute browser suite. A wrong rounding rule waits for that suite, and half the time the failure is a selector. Put the rule in the unit test.

Pitfalls

  • Coverage % as a goal. 100% of a wrong spec is still wrong.
  • Environments that only exist on one laptop.
  • No owner for flaky tests — they train the team to ignore red.

Related: TDD, BDD, code smells.