State-based testing validates system behavior by checking outcomes rather than implementation details. Mock-based interaction testing creates brittle tests that break on harmless refactors while missing real bugs. Handwritten fakes that implement domain rules provide better test maintainability and reliability than generated
Table of contents
Test state, not interactions #Mocking libraries often don’t help #Interface-guided design and fakes #Fakes vs real systems #Parting words #Recent postsSort: