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

Implementations

Almost by definition, you will not be able to test all of an implementation through its interface. All but the simplest of implementations will require nontrivial code to bring the interface’s behavior to life. In other instances, an interface only represents a single role of an implementation class. Sometimes a class will implement multiple interfaces in this way.

You are less likely to encounter this phenomenon in functional or procedural languages in which the code under test has a single purpose. However, if you take a feature-based, rather than function- or method-based, approach to your testing, you may find the need to invoke multiple functions to test the feature, not all of which are part of a published interface.

Using ...

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