TACCLE: A methodology for object-oriented software testing at the class and cluster levels

被引:70
作者
Chen, HY
Tse, TH
Chen, TY
机构
[1] Univ Hong Kong, Dept Comp Sci & Informat Syst, Hong Kong, Hong Kong, Peoples R China
[2] Jinan Univ, Dept Comp Sci, Guangzhou 510632, Peoples R China
[3] Swinburne Univ Technol, Sch Informat Technol, Hawthorn, Vic 3122, Australia
关键词
languages; reliability; algebraic specifications; contract specifications; object-oriented; programming; software testing; message passing;
D O I
10.1145/366378.366380
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Object-oriented programming consists of several different levels of abstraction, namely, the algorithmic level, class level, cluster level, and system level. The testing of object-oriented software at the algorithmic and system levels is similar to conventional program testing. Testing at the class and cluster levels poses new challenges. Since methods and objects may interact with one another with unforeseen combinations and invocations, they are much more complex to simulate and test than the hierarchy of functional calls in conventional programs. In this paper, we propose a methodology for object-oriented software testing at the class and cluster levels. In class-level testing, it is essential to determine whether objects produced from the execution of implemented systems would preserve the properties defined by the specification, such as behavioral equivalence and nonequivalence. Our class-level testing methodology addresses both of these aspects. For the testing of behavioral equivalence, we propose to select fundamental pairs of equivalent ground terms as test cases using a black-box technique based on algebraic specifications, and then determine by means of a white-box technique whether the objects resulting from executing such test cases are observationally equivalent. To address the testing of behavioral nonequivalence, we have identified and analyzed several nontrivial problems in the current literature. We propose to classify term equivalence into four types, thereby setting up new concepts and deriving important properties. Based on these results, we propose an approach to deal with the problems in the generation of nonequivalent ground terms as test cases. Relatively little research has contributed to cluster-level testing. In this paper, we also discuss black-box testing at the cluster level. We illustrate the feasibility of using Contract, a formal specification language for the behavioral dependencies and interactions among cooperating objects of different classes in a given cluster. We propose an approach to test the interactions among different classes using every individual message-passing rule in the given Contract specification. We also present an approach to examine the interactions among composite message-passing sequences. We have developed four testing tools to support our methodology.
引用
收藏
页码:56 / 109
页数:54
相关论文
共 31 条
[1]  
[Anonymous], P ICSE
[2]   SOFTWARE TESTING BASED ON FORMAL SPECIFICATIONS - A THEORY AND A TOOL [J].
BERNOT, G ;
GAUDEL, MC ;
MARRE, B .
SOFTWARE ENGINEERING JOURNAL, 1991, 6 (06) :387-405
[3]  
BORBA P, 1994, P INT WORKSH INF SYS
[4]   TEST SETS GENERATION FROM ALGEBRAIC SPECIFICATIONS USING LOGIC PROGRAMMING [J].
BOUGE, L ;
CHOQUET, N ;
FRIBOURG, L ;
GAUDEL, MC .
JOURNAL OF SYSTEMS AND SOFTWARE, 1986, 6 (04) :343-360
[5]  
BREU R, 1993, ALGEBRAIC METHODOLOG, P343
[6]  
BREU R, 1991, ALGEBRAIC SPECIFICAT
[7]  
CHEN HY, 1987, P 2 INT S INT SYST M, P51
[8]  
CHEN HY, 1987, P 2 INT S INT SYST M, P71
[9]  
CHEN HY, 2000, PROTOTYPES INITIAL E
[10]  
Chen Y, 1998, COMP MET WATER RES, V4, P3