A case study in class testing

In contrast to the explosion of activity in object-oriented design and programming, little attention has been given to object testing. In our approach, a driver class and an oracle class are developed for each class-under-test (CUT). The driver class is based on a testgraph which partially models the CUT as a state machine, but with vastly fewer states and transitions. The oracle class provides essentially the same operations as the CUT, but supports only the testgraph states and transitions. Surprisingly thorough testing is achievable with simple test graphs and oracles. The key is designing the two together, to avoid tests for which input generation and output checking are unaffordable. We illustrate our approach with a test suite developed for a class from a commercial library.

[1]  John D. McGregor,et al.  Incremental testing of object-oriented class structures , 1992, ICSE '92.

[2]  William E. Howden,et al.  Reliability of the Path Analysis Testing Strategy , 1976, IEEE Transactions on Software Engineering.

[3]  Daniel Hoffman,et al.  A CASE study in module testing , 1989, Proceedings. Conference on Software Maintenance - 1989.

[4]  D. J. Robson,et al.  A framework for testing object-oriented programs , 1992 .

[5]  Daniel Hoffman,et al.  Automated Module Testing in Prolog , 1991, IEEE Trans. Software Eng..

[6]  Deepinder P. Sidhu,et al.  Formal Methods for Protocol Testing: A Detailed Study , 1989, IEEE Trans. Software Eng..

[7]  Boris Beizer,et al.  Software testing techniques (2. ed.) , 1990 .

[8]  Gail C. Murphy,et al.  Object-oriented systems testing methodology: an overview , 1992 .

[9]  Bjarne Stroustrup,et al.  The C++ programming language (2nd ed.) , 1991 .

[10]  Daniel Hoffman,et al.  Graph-based Class Testing , 1994, Aust. Comput. J..

[11]  C. H. West,et al.  Executable Description and Validation of SNA , 1980, IEEE Trans. Commun..

[12]  Alan M. Davis,et al.  A comparison of techniques for the specification of external system behavior , 1988, CACM.

[13]  Richard G. Hamlet,et al.  Data Abstraction, Implementation, Specification, and Testing , 1981, TOPL.

[14]  D. J. Robson,et al.  The Testing of Object-Oriented Programs , 1993 .

[15]  Tsun S. Chow,et al.  Testing Software Design Modeled by Finite-State Machines , 1978, IEEE Transactions on Software Engineering.

[16]  Gail E. Kaiser,et al.  Adequate testing and object-oriented programming , 1990 .

[17]  David J. Panzl A language for specifying software tests , 1978, AFIPS National Computer Conference.