Testing Object-Oriented Programs - An Integrated Approach


Mei-Hwa Chen and Ming-Hung H. Kao

ABSTRACT


Traditional testing techniques often overlook object-oriented faults that are either caused by inheritance and/or polymorphism features or are introduced in object management. We present an object-flow based testing strategy that utilizes two object-flow coverage criteria--all-bindings and all-du-pairs--in testing object-oriented programs. The all-bindings criterion takes inheritance and polymorphism features into account to ensure that every binding of every object is exercised under some test. Whereas, the all-du-pairs criterion is applied to monitor the behavior of every object during its lifetime by keeping track of where the object is defined and where such definition is referenced. These object-flow coverage criteria can be used to develop test cases that are able to trigger object-oriented faults. Furthermore, an integrated approach that incorporates the object-flow based testing strategy with traditional testing techniques as well as state based testing technique is introduced. The results of our empirical study conducted on three industrial systems show that with this approach the reliability of the systems can be improved significantly and at least 80\% of the maintenance cost can be reduced.