Share this comment
Based on the definition of a unit here, how would you then define/describe an integration test?
I agree that too many small tests can be bad, and not every function requires a test, however, I was under the impression that the image you have under ["So What is a UNIT"](craftbettersoftware.com…), the image on the left IS-A unit test and th…
© 2025 Daniel Moka
Substack is the home for great culture
Based on the definition of a unit here, how would you then define/describe an integration test?
I agree that too many small tests can be bad, and not every function requires a test, however, I was under the impression that the image you have under ["So What is a UNIT"](https://craftbettersoftware.com/i/148523986/so-what-is-a-unit), the image on the left IS-A unit test and the image on the right IS-AN integration test.
Would love to hear your thoughts on this. Thanks!
Not the author, but I think typically Chicago school unit testers would consider an integration test something that interacts with an external dependency, e.g. database
I would consider that to be an integration test as well, but what you described as an integration test, is what they are calling a unit test (from my understanding of reading the article). Again, I could be misunderstanding, perhaps two “components” (maybe services or methods) make up one unit, but a database is different enough that it would make the test be an integration test.
I just didn’t get that from reading the article.