O'Reilly logo

Quality Code: Software Testing Principles, Practices, and Patterns by Stephen Vance

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coupling and Testability

Coupling is the degree to which one section of code depends on another. Clearly, test code depends on the code it tests based on the nature of that relationship. For black-box testing, test code depends on the interface of the test target as well as any data types or dependent interfaces or signatures used in the interface. If a method takes a type in its parameter list, the calling code—and therefore the tests—need to be able to obtain or create that type. When a method returns a type, the calling code uses that value, expressing a degree of knowledge about that type. The same holds true even when interfaces are used because interfaces specify types. Functional, procedural, and dynamic languages are not immune to this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required