Minimize Coupling

One of the primary arguments against extensive testing is that the maintenance of the tests creates an overhead that grows faster than the size of the source base. Most commonly, you will hear statements such as, “It’s too hard to maintain all those tests.”

In my experience, this effect can be almost eliminated by controlling the coupling2 of the tests. The means to control the coupling varies depending on the type of test under discussion.

2. The concept of coupling was introduced into the computer science lexicon by Edward Yourdon and Larry Constantine as part of structured design [SD]. It describes the degree of dependency between modules in a software system.

Coupling in system and integration tests generally occurs when ...

Get Quality Code: Software Testing Principles, Practices, and Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.