| ![]() |
Testing the Polymorphic Interactions between Classes?
Robert McDaniel
John D. McGregor
Department of Computer Science
Clemson University
Clemson, SC 29634-1906
[email protected]
Abstract
To date, much of the effort spent in research with object-oriented technology has been in
the design and implementation phase. An important activity of the object-oriented software
development process which has not been the focus of a great deal of research is that of testing.
In particular, testing the interactions between two or more classes has received virtually no
focused attention. This notion, termed inter-class testing, when compared to inter-procedural
testing, involves some of the same problems and concerns with functionality and data. However,
the combination of such features as object state, polymorphism, and dynamic binding
that make the object-oriented paradigm attractive to developers, introduce new obstacles unseen
in any other testing environment. This work examines testing interactions, or message
passes, between classes and pinpoints problems introduced by the object-oriented paradigm.
The combination of object state and the possibility of polymorphic substitutions can, if considered
exhaustively, compound the testing effort significantly when testing the interaction of
two classes via a message. To aid in reducing the testing effort introduced by these combined
features of the object-oriented paradigm, a polymorphic message pass is defined in terms of an
orthogonal array. The resulting test domain coverage generated, based on theory of a method
called Robust Testing, is examined in terms of three levels of defined adequacy. Additionally,
some guidelines for inter-class testing based on the method developed in this paper are given.
?The current version of this technical report is heavily based on Robert McDaniel's masters thesis entitled The Effects of Polymorphism, Dynamic Binding, and Object State on Testing the Interactions of Classes