Chapter 7. Testing Class Hierarchies

Inheritance is a powerful mechanism for interface and code reuse. In this chapter we describe approaches for the execution-based testing of classes in an inheritance hierarchy. We show how to test a subclass given that its superclass has been tested using the techniques in Chapter 5 and Chapter 6. We consider many aspects of subclass testing, including adequate testing of subclasses, reuse of test cases for a class in ...

Get A Practical Guide to Testing Object-Oriented Software 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.