Skip to content

Testing

Which test would have caught this bug?

unit testsintegration testsend-to-end testscontract testsload testssecurity testsmockingfixturesCI

Lessons

  1. 18.1The testing pyramid: which test catches which bug?Different tests catch different bugs. Here's how to pick the cheapest test that can still catch each one. 30 min Which test catches it? CI/CD pipeline
  2. 18.2Mocks, fakes and fixtures: testing without lying to yourselfFast tests need stand-ins for slow, random or risky things. Used well, they speed you up. Used badly, they hide real bugs. 30 min Which test catches it?
  3. 18.3Contract, load and security tests: the bugs that live between and underSome bugs hide between services, some only appear under heavy traffic, some only under attack. Normal tests miss all three. 30 min Latency percentiles Server under load

On the job: try it on your own project

Ask Claude Code to summarise your test suite: how many unit, integration and end-to-end tests, how long it takes, which tests are flaky, and which critical flows have no test at all. Pick one untested critical flow. Write its acceptance criteria as test cases in plain words, then let Claude Code implement them on a branch and review the result.

Can you do this now?

0/4. Anything you can't tick yet: reopen that lesson's practice ladder.