Design for Test
summary
Argues that testability comes from design: isolate business logic from environmental I/O, invert dependencies, and construct object graphs separately so core algorithms stay stable while adapters change. Shows applied patterns — facade, plugin/callbacks, outbound interfaces, event-driven timeouts — and concrete practices: mock environmental services, inject clocks, and prefer constructor injection over new/singleton/service-locator. Gives case studies including a C++ network server with 450 unit tests, 94% line coverage, and full-suite runs in 250 milliseconds, plus PayPal stubs, Apache MQ/Google Mock GUI tests, and numeric-algorithm unitization.
AI-written summary · about
chapters (11)
- 0:00Designing for testability
- 4:44Analyzing real-world cases
- 9:24Internal vs external quality
- 13:18Dependency management patterns
- 16:58Mocking and object graphs
- 20:26Wiring objects effectively
- 24:48Environment and time control
- 28:14Combining design patterns
- 30:06Practical case study examples
- 36:14Benefits and trade-offs
- 41:53Summary and Q&A
related talks
28mDesign for Testability
55mUnit Testing Like a Pro - Towards a Testable Design
01h 00mTest-Driven Design Insights - 10 Hints You Were Missing
01h 05mMicrotesting
40mRAMP up your testing solution: test automation patterns
46mThe Road to Improving Testability
46mKeeping system design under control using isolated unit testing
46mTesting the untestable - patterns and use cases analysis
