Integration Tests Are A Scam
Integration tests are a scam, a self-replicating virus that takes over your project and burdens you with long-running, fragile, hard-to-understand test suites. You’re probably writing 2-5% of the integration tests you need to test thoroughly. You’re probably duplicating unit tests all over the place. Your integration tests probably duplicate each other all over the place. When an integration test fails, who knows what’s broken? When you refactor, you have to fix dozens of integration tests. Stop it. Learn the two-pronged attack that solves the problem: collaboration tests and contract tests.
We start with 45 minutes of describing the problems, the techniques and answering some initial questions and doubt. We continue with a kata: I demonstrate the technique by replacing integration tests with collaboration and contract tests and showing the improvement. 10 minutes. Next, attendees try the technique, following the kata as closely as they can. First, they try on their own, for 30 minutes. Next, someone volunteers to try the technique on stage, following the kata, but with me to critique and correct them. This needs 30 minutes. After that, the groups decides: Q&A, another demonstration, another iteration of trying the kata, whatever works for them.
- understand why integration/end-to-end tests don’t find real problems
- understand why integration/end-to-end tests don’t return enough to justify their investment
- learn what collaboration tests and contract tests are
- learn how to test 99% of your system entirely in memory with a suite that runs in minutes, not hours or days
- learn how focusing on collaboration tests and contract tests positively impacts your design

Add to calendar