Test-Driven Design Insights - 10 Hints You Were Missing
summary
Ten concrete design hints: tests act as feedback not just safety, and mocks speed tests but hide integration bugs; prefer start Postgres in a Testcontainer or WireMock for repeatable microservice integration; use social unit tests (group collaborators) instead of solitary mocked classes; extract pure functions for heavy logic and return immutable objects to avoid temporal coupling; aim tests early (within first ~30% of work); expect 60–80% of microservice endpoints to be simple and covered by integration tests; avoid mocking trivial mappers.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 8:00The Testing Pyramid
- 9:52Mocks
- 11:56Complexity
- 13:37Sleep Bugs
- 15:06The Reality
- 21:41More Complexity More Feedback
- 23:16Testing Too Late
- 27:36Simple Example
- 30:31Object Mother
- 35:31Architecture
- 39:28Heavy Complexity
- 43:43Class Wide
- 51:03Connection
- 53:37Mutable objects
- 55:34Summary
related talks
49mDesign for Test
43mTest Driven Design - Coupling Loosely
39mTen things you heard about testing that might be wrong
57mAdvanced Testing Techniques: Tips from the trenches
33mHow to Practice Test Driven Development without Shooting Yourself in the Foot
41mFixing Design with Tests
41mTesting done right: From bugs to brilliance
48mModern Testing Patterns
