Testable Architecture: Keep 'em Separated
summary
Argues two concrete rules: keep I/O separate and domain must not depend on I/O, implemented as hexagonal + DDD in Java with ArchUnit checks, JUnit Pioneer for small console fakes, Testcontainers and Postgres for slower integration tests, and swappable adapters (SendGrid replaced without code changes). Shows a real mob-programming session manager, measures IO-free tests under a few seconds, and recommends renaming tests to I/O-free vs I/O-based for clarity and speed.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:17Layers vs tiers
- 2:20Two rules for testable architecture
- 4:54Testable architecture patterns
- 8:25Hexagonal architecture explained
- 13:40Ports and adapters
- 15:47Code examples and benefits
- 17:53Fast tests and IO-free tests
related talks
25mTestable Architecture: Keep 'em Separated
53mThe Grand Unified Theory of Clean Architecture and Test Pyramid
30mMastering Testing in a Hexagonal Architecture
51mA testable architecture
50mThe Grand Unified Theory of Clean Architecture and Test Pyramid
47mThe Grand Unified Theory of Clean Architecture and Test Pyramid
01h 01mClean Architecture
48mLet's adopt the `clean archigonal`
