Why Your Test Suite Sucks
summary
Begins with four development phases — manual, automated, test‑first, full TDD — and claims TDD pays off when tests capture behavior not implementation. Shows brittle examples in PHP unit and PHP spec: mocking queries, expecting call order, and stubs returning stubs that reveal classes with three or more hidden dependencies. Describes building a file uploader that passes unit doubles but fails in production because one real API call (finalize_upload) is missing and argues for composition over inheritance plus slow integration tests against the real cloud.
AI-written summary · about
chapters (36)
- 0:00Introduction
- 1:27Dont do this
- 3:57Not getting the benefits
- 4:42Different phases of testing
- 5:33Where do you learn to test
- 6:35Why move to automated testing
- 7:23Issue tracking system
- 10:01Writing the test first
- 11:25Design implementation first
- 12:11Test suites still brittle
- 12:39Testdriven development
- 14:46Mock queries
- 15:23Example
- 19:47Summary
- 24:05stubs returning stubs
- 24:38notifying users
- 25:51train wreck
- 26:54user object
- 27:59double or stub
- 29:09Validate returns
- 29:50The problem
- 30:29Double the validator
- 31:29Design is important
- 32:27People worry about writing tests
- 33:07What happens with TDD
- 33:54TDD is a way to think about your code
- 36:37TDD is a complicated one
- 37:26Testing thirdparty code
- 38:14Testing objects
- 39:13Testing framework repository
- 41:17Testing user repository
- 43:12Double repository
- 44:03Example of double repository
- 47:22Cloud API
- 50:17Interface
- 52:37Dont Test








