Unit and Integration Tests
In this post I argue that integration-vs-unit is a confused, and harmful, distinction. I provide a more useful two-dimensional mental model instead. The model is descriptive (it allows to think more clearly about any test), but I also include my personal prescriptions (the model shows metrics which are and aren’t worth optimizing). Credit for the idea goes to the SWE book. I always felt that integration versus unit debate is confused, the book helped me to formulate in which way exactly. I won’t actually rigorously demonstrate the existing confusion — I find it self-evident. As just two examples: Most of the time, it’s more productive to speak about just “tests”, or maybe “automated tests”, rather than argue where something should be considered a unit or an integration tests. But I argue that a useful, more precise classification exists. The first axis of classification is, broadly speaking, performance. “How much time would a thousand similar tests take?” is a very useful metric. The
In this post I argue that integration-vs-unit is a confused, and harmful, distinction. I provide a more useful two-dimensional mental model instead. The model is descriptive (it allows to think more clearly about any test), but I also include my personal prescriptions (the model shows metrics which are and aren’t worth optimizing). Credit for the idea goes to the SWE book . I always felt that integration versus unit debate is confused, the book helped me to formulate in which way exactly. I won’t actually rigorously demonstrate the existing confusion — I find it self-evident. As just two examp
Explore this link on the map →related reading
- Test Organization - The Rust Programming Languagedoc.rust-lang.org
- Google Testing Blogtesting.googleblog.com
- Reading 2: Testingweb.mit.edu
- Software Engineering at Googleabseil.io
- Why Good Developers Write Bad Unit Tests · mtlynch.iomtlynch.io
- Reading 3: Testingweb.mit.edu
- https://danluu.comdanluu.com
- Tao on “blue team” vs. “red team” LLMs | Hacker Newsnews.ycombinator.com
- CSC 151 - Unit Testingeikmeier.sites.grinnell.edu
- Crafting High Quality Unit Tests: Tips and Best Practicesmarclittlemore.com
- Introducing FrontierCode | Cognitioncognition.ai
- The Joel Test: 12 Steps to Better Code – Joel on Softwarejoelonsoftware.com