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

9m read timeFrom rednafi.com
Post cover image
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 posts

Sort: