Let’s dive into the topic of testability
summary
Defines testability as accessibility, observability, predictability, reproducibility and shows concrete mitigations: wrap time and randomness behind interfaces so tests can inject randomness or deterministic clocks; use stubs for expensive collaborators and verify state with check before and check after database assertions; prefer hexagonal ports and adapters to swap real services for test doubles; advises package-private helpers over testing private methods and recommends outside-in TDD for complex integration.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 0:58Speaker background
- 2:02What is testability
- 3:29Hard vs easy to test
- 4:34Broken glass syndrome
- 5:39Accessibility in testing
- 7:27Testing private functions
- 8:30Observability in tests
- 9:57Predictability challenges
- 11:00Fundamental theorem of software
- 12:22Mitigating randomness
- 14:50War story from 2001
- 17:01External dependencies
- 17:42Reproducibility in tests
- 18:25Testable architecture
- 19:07Hexagonal architecture
- 20:10Test-driven development
- 20:51Conclusion and mindset
related talks
44mHow Testability Supports Your Agility
01h 19mYou Can't Test This? Hammertime!
28mDesign for Testability
44mTesting the untestable - patterns and use cases analysis
46mTesting the untestable - patterns and use cases analysis
08mTesting in a complex world
01h 00mTestability and API Design
06mWhy do we need to test?
