IEEE Transactions on Software Engineering 39 (11): 1549-1563 (2013)

Equality to Equals and Unequals:
A Revisit of the Equivalence and Nonequivalence Criteria
in Object-Oriented Software Testing

Huo Yan Chen 2 and T.H. Tse 3

[paper from IEEE Xplore | paper from IEEE digital library | technical report TR-2013-06]


Algebraic specifications have been used in the testing of object-oriented programs and received much attention since the 1990s. It is generally believed that class-level testing based on algebraic specifications involves two independent aspects: the testing of equivalent and nonequivalent ground terms. Researchers have cited intuitive examples to illustrate the philosophy that even if an implementation satisfies all the requirements specified by the equivalence of ground terms, it may still fail to satisfy some of the requirements specified by the nonequivalence of ground terms. Thus, both the testing of equivalent ground terms and the testing of nonequivalent ground terms have been considered as significant and cannot replace each other. In this paper, we present an innovative finding that, given any canonical specification of a class with proper imports, a complete implementation satisfies all the observationally equivalent ground terms if and only if it satisfies all the observationally nonequivalent ground terms. As a result, these two aspects of software testing cover each other and can therefore replace each other. These findings provide a deeper understanding of software testing based on algebraic specifications, rendering the theory more elegant and complete. We also highlight a couple of important practical implications of our theoretical results.

Keywords: Software testing, equivalence criterion, nonequivalence criterion, algebraic specification, object-oriented software

1. This research is supported by a grant from the National Science Foundation of China (project no. 60173038), grants from the General Research Fund of the Research Grant Council of Hong Kong (project nos. 716612 and 717811), and a linkage grant from the Australian Research Council (project no. LP100200208). Part of the research was conducted when Chen was in Canada supported by CuiTeck Inc. in Montreal. Part of the research was conducted when Tse was serving as a distinguished visiting scholar at the Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, Beijing, China.
2. Huo Yan Chen worked with the Department of Computer Science, Jinan University, Guangzhou, 510632, China, and is retired in Toronto, ON, Canada.
3. Department of Computer Science, The University of Hong Kong, Pokfulam, Hong Kong.


  Cumulative visitor count