Fakes over Mocks: Shift your paradigm and identify monolithic code
summary
Company moves from heavy mocking to reusable fakes, replacing many mockito/mocktail uses and revealing hidden SRP violations: codebase shows 647 mocks declared before the shift. Engineering builds the charlatan package to fake HTTP clients and creates shared fakes for plugins and native boundaries, so tests exercise real behavior across network and platform. Teams run broader widget-level tests and full-feature flows using fakes for network and native boundaries, catch monolithic services, split responsibilities, and reduce brittle white-box verification.
AI-written summary · about
chapters (12)
- 0:00Introduction and speaker intro
- 1:58What are test doubles
- 4:24Mocks vs spies vs fakes
- 6:07Betterment’s testing evolution
- 8:57Over-reliance on mocks
- 11:44Hidden SRP violations
- 14:31Testing paradigm shift
- 16:39When mocks are still useful
- 18:04Where fakes fit now
- 20:29Path forward with fakes
- 21:55Testing beyond unit level
- 24:03Next steps and conclusion
related talks
41mMocks vs Fakes vs Stubs
30mRefactoring and Test Fakes: Crafting Resilient Code with Confidence
37mBeyond the Mockery: Why We Should Embrace Testing Without Mocking Frameworks
45mStop Using Mocks (for a while)
27mDe-mock your tests
52mPlease don’t mock me
31mBeyond the Mockery- Why We Should Embrace Testing Without Mocking Frameworks
40mStrategic Business Functionality Testing: Accelerating Development Through Mocking
