In Black and White: An Integrated Approach to Object-Oriented Program Testing

Huo Yan Chen,T. H. Tse,Fun Ting Chan,Tsong Yueh Chen
IF: 3.685
1998-01-01
ACM Transactions on Software Engineering and Methodology
Abstract:Because of the growing importance of object-oriented programming, a number of testing strategies have been proposed. They are based either on pure black-box or white-box techniques. In this paper, we propose a methodology to integrate the black-box and white-box techniques. The black-box technique is used to select test cases. The white-box technique is mainly applied to decide whether two objects resulting from the program execution of a test case are observationally equivalent. It is also used to select test cases in some situations. We define the concept of a fundamental pair as a pair of equivalent terms which are formed by replacing all the variables on both sides of an axiom by normal forms. We prove that an implementation is consistent with respect to all equivalent terms if and only if it is consistent with respect to all fundamental pairs. In other words, the testing coverage of fundamental pairs is identical to that of all possible term rewritings, and hence we need only concentrate on the testing of fundamental pairs. Our strategy is simple, efficient, and based on mathematical theorems. According to the strategy, we propose an algorithm for selecting finite sets of fundamental pairs as test cases. Given a pair of equivalent terms as a test case, we should then determine whether the objects that result from executing the implemented program are observationally equivalent. We prove, however, the observational equivalence of objects cannot be determined using a finite set of observable contexts (namely, operation sequences ending with an observer function) derived from any black-box technique. Hence we supplement our approach with a “relevant observable context” technique, which is a white-box technique, to determine the observational equivalence. The relevant observable contexts are constructed from a Data Member Relevance Graph, which is an abstraction of the given implementation for a given specification.
What problem does this paper attempt to address?