Testing the polymorphic relationships of object-oriented programs

Roger T. Alexander, A. Jefferson Offutt · 2001

The emphasis in object-oriented programs is on defining abstractions that have both state and behavior. This emphasis causes a shift in focus from software units to the way software components are connected. Thus, we are finding that we need less emphasis on unit testing and more on integration testing. The compositional relationships of inheritance and aggregation, especially when combined with polymorphism, introduce new kinds of integration faults. The research presented in this thesis is based on the key insight that the primary mechanism for integration is coupling between components. Previous research demonstrated that coupling-based testing techniques can be used for integrating components in procedural programs. This thesis extends previous work to account for the compositional relationships found in object-oriented programs. The key contributions include a formalism for representing the state interactions and behavior that result from method calls where inheritance and polymorphism are a factor, a set of test-adequacy criteria that are effective at detecting faults that are peculiar to object-oriented programs, a technique for identifying data flow anomalies within inheritance hierarchies, a model of the faults that can occur in object-oriented programs, and a graphical model for analyzing and understanding the effects of polymorphism within a class hierarchy. This research has also produced a proof of concept tool that demonstrates the practicality and effectiveness of the coupling-based analysis and testing techniques.

Read the paper · More papers on PaperTik