My personal view is that it's an integration test only if the test actively involves external components (like a real database, some other api, etc..). I don't use integration test terminology if all those external components are mocked/stubbed out (even if it encompasses a large "unit").
I also call those mocked surface area tests "functional" tests, partially to differentiate them from non-mocked integration tests, and partially because people get too hung up on the "unit" term.
Re:Is TDD Dead? (2014)
by closeparen on Wednesday August 26, 2020 @01:00PM
(#24284418)
Often it's convenient to test the functions in your database access layer against a real or convincingly simulated database (e.g. sqlite). This is "like a unit test" in that it focuses on the details of individual functions, but "like an integration test" in that it crosses a system boundary rather than mocking it. I've not found it productive to use either term when talking about it.
Re:Is TDD Dead? (2014)
by digitalsushi on Wednesday August 26, 2020 @09:37AM
(#24282321)
The parent above you didn't necessarily imply that the whole microservice was being integrated before testing it. It is reasonable that a microservice can exist as whole, but nonintegrated with its other deliverable components, and remains sufficiently unit-testable.
It's also extremely likely that the microservice needs to be integrated to test it :)
Yes, this. However, when we go in the direction of testing a complete service, is it not more convenient to call it an integration test?