Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

11
  • 4
    So you're focussing on the relevance of a single chapter heading, and ignoring the fact his entire book is titled "Unit Testing Principles, Practices, and Patterns". That's besides how he's conflated the concepts of unit tests and integration tests in his article too. It's very charitable indeed to suggest we should read more of this author rather than less! 😂 Commented Sep 25, 2024 at 7:36
  • 1
    @Steve integration testing is a form of unit testing, technically. It uses the same technical tools, but tests application components in combination rather than separately. Commented Sep 25, 2024 at 9:53
  • 2
    @jwenting, it's certainly a form of testing, but "unit testing" surely relates to the testing of "units", not the testing of any kind of assemblage or system of them. At least that's my understanding. Commented Sep 25, 2024 at 10:38
  • 8
    @Steve There is no universal agreed definition of where unit tests ends and integration tests begin. I don't know what definition Khorikov uses, but it is perfectly reasonable to argue that a test which involves a database is a unit test if that database can be considered an implementation detail inside the unit under test and the test runs in isolation from other tests. In any case, the terminology is not the important issue, the question is if mocking the database in automated tests results in more or less robust code. Commented Sep 25, 2024 at 17:51
  • 1
    @Steve: I am not focussing on the relevance of a "single chapter heading". I recommend you have a look into the book, too, before judging. And yes, though the book is titled "Unit Testing ...", it also contains a clearly separated section about integration testing, That does not make the book worse, Commented Sep 27, 2024 at 6:09