ClassBench: A Methodology and Framework for Automated Class Testing

In contrast to the explosion of activity in object-oriented design and programming, little attention has been given to object testing. We present a novel approach to automated testing designed especially for collection classes. In the ClassBench methodology, a testgraph partially models the states and transitions of the class-under-test (CUT) state/transition graph. To determine the expected behavior for the test cases generated from the testgraph, the tester develops an oracle class, providing essentially the same operations as the CUT but supporting only the testgraph states and transitions. Surprisingly thorough testing is achievable with simple testgraphs and oracles. The ClassBench framework supports the tester by providing a testgraph editor, automated testgraph traversal, and a variety of utility classes. Test suites can be easily conngured for regression testing|where thousands of test cases are run|and debugging|where a few test cases are selected to isolate the bug. We present the ClassBench methodology and framework in detail, illustrated on both simple examples and on test suites from commercial collection class libraries.

[1]  Phyllis G. Frankl,et al.  The ASTOOT approach to testing object-oriented programs , 1994, TSEM.

[2]  Thomas R. Arnold,et al.  Testing “in a perfect world” , 1994, CACM.

[3]  Daniel Hoffman,et al.  Testing the C set++ collection class library , 1994, CASCON.

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

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

[6]  Daniel Hoffman,et al.  Software design, automated testing, and maintenance - a practical approach , 1995 .

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

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

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

[10]  Standard Glossary of Software Engineering Terminology , 1990 .

[11]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[12]  Brian Marick,et al.  The craft of software testing , 1994 .

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

[14]  Robert V. Binder,et al.  Design for testability in object-oriented systems , 1994, CACM.

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

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

[17]  Gail C. Murphy,et al.  Experiences with cluster and class testing , 1994, CACM.