My 25 Laws of Test Driven Development
summary
Claims 35+ concise rules distilled from 15 years of TDD practice: organize code into functional slices and align test scope to those slices, prefer small integration-like units over pointless adapters, avoid unnecessary interfaces and don't mock mocks. Uses concrete tools: spins up testcontainers for .NET to run real databases in tests, runs in-process HTTP requests instead of calling controller methods, and relies on Fluent Assertions and mutation testing to reach ~97% coverage. Counters DRY-driven coupling and insists tests fail for the right reason.
AI-written summary · about
chapters (29)
- 0:00Introduction
- 5:32The TDD process
- 9:01Driving design with tests
- 10:06Architectural slices
- 10:32Dependency inversion
- 14:12Avoiding over-refactoring
- 16:39Defining the unit
- 22:33Testing functional slices
- 23:47Test scope guidelines
- 24:13Structure and organization
- 27:16API testing techniques
- 29:13Using databases in tests
- 30:02Testing methodologies
- 32:09Test terminology
- 33:00Test code quality
- 34:05Tests as documentation
- 36:02Interfaces and mocking
- 37:15Effective mocking
- 37:49Test data builders
- 38:20Test refactoring rules
- 38:34Magic numbers and strings
- 40:06Data assertions
- 41:50Test file naming
- 42:51Fact-based naming
- 44:12Refactoring techniques
- 46:36Debugging prevention
- 46:56Test structure tips
- 47:28Scenarios
- 49:48Conclusion








