Integration Tests Are Bogus
summary
Argues that most integration tests are unnecessary if unit tests use verified doubles and lightweight contract checks, and demos this with a weather/plane and navigator example. Shows using bogus or RSpec 3 verified doubles to enforce that stubs match real method names and arity so tests fail fast instead of lying, and sketches experimental contract tests to ensure collaborators actually handle the calls. Claims faster, more reliable feedback and fewer flaky end-to-end tests.
AI-written summary · about
chapters (17)
- 0:00Introduction and disclaimer
- 1:41Why integration tests matter
- 6:20End-to-end vs unit tests
- 8:06Mocks and stubs explained
- 13:48Testing public API only
- 15:58Risks of mocks and stubs
- 18:28Why integration tests fail
- 20:53Live coding demo begins
- 23:25Fixing slow unit tests
- 25:11Verified doubles with Bogus
- 29:27Verified doubles in RSpec
- 30:31Outside-in development
- 31:36Mocking external services
- 34:21Fake roles and contracts
- 36:27Contract testing explained
- 38:54Testing real-world scenarios
- 40:18Recap and key takeaways
related talks
38mINTEGRATION TESTS ARE BOGUS
40mTest Doubles are Not To Be Mocked
27mFake Your Test Away: How To Abuse Your Test Doubles
29m"Testing. Why so serious?"
44mTesting the untestable - patterns and use cases analysis
01h 00mTesting Heresies
10mIntegration Testing – a thought experiment
44mTesting: Integration Tests - The good, bad and ugly
