flâneur — a map of the web's best reading

Unit and Integration Tests

matklad.github.io · 1,166 words · saved by 1 readers

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