¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: testing on the web


 

On Thu, Mar 31, 2022 at 4:07 PM Steven Smith <ssmith.lists@...> wrote:
I infer that you're using the term "integration test" to mean "unit test for a bigger unit". It's still a unit, even if it's a large one. :) (Yes, I'm trying to rehabilitate the original meaning of "unit": any independently-inspectable part of the system. And yes, that means that the entire system is a unit.)

Respectfully, this definition makes the term unit test worthless and replaceable with just "test" or at best "automated test".

I don't think so. It describes a particular intent of the test: to check an inspectable unit, rather than limit oneself only to end-to-end tests or tests through the end-user interface. It merely simplifies the definition to label "the entire system" as a unit. In practice, unit tests are rarely end-to-end tests, except that some programmers insist on using end-to-end tests (or at least very large unit tests) to check small units of the system.

Moreover, it stands in contrast to "system test", which has the specific intent of checking system-level issues that are generally not considered faults of a single, particular unit.

Differentiating between unit tests (tests that only test your code, not dependencies, and ideally?a very small part of your code like a single method or class) and integration tests (which include more of the system than unit tests and may include infrastructure concerns) can be very useful both for discussion purposes and as a means of splitting your tests into groups or projects, I've found.

Those are useful distinctions. Using the terms "unit test" and "integration test" for them is both familiar and inaccurate. The terms become arbitrary jargon that newcomers have to learn, then unlearn.

Yes, I know that those terms are not going away, even with those inaccurate usages. They are inaccurate nonetheless. I witness the confusion about the intent of so-called "integration tests" at least a few times per month. (Hint: they're often not actually checking integration.) When I use more-accurate terms in a smaller community, understanding improves. The rest of the world is welcome both to join us and not join us. I get paid the same.
--
J. B. (Joe) Rainsberger :: ?:: ::

--
J. B. (Joe) Rainsberger :: :: ::
Teaching evolutionary design and TDD since 2002

Join [email protected] to automatically receive all group messages.