Chapter 7. Testing Class Hierarchies
Need to know what must be retested in code that is inherited? See Hierarchical, Incremental Testing.
Want to encapsulate the test cases for a specific class using PACT? See Organizing Testing Software.
Want to know what testing is possible if the class is abstract? See Testing Abstract Classes.
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.