Specification-based class testing: a case study

The paper contains a case study demonstrating a complete process for specification based class testing. The process starts with an abstract specification written in Object-Z and concludes by exercising an implementation with test cases and evaluating the results. The test cases are derived using the Test Template Framework for each individual operation. They are analysed to generate a finite state machine that can execute test sequences within the ClassBench framework. An oracle is also derived from the Object-Z specification. The case study demonstrates how a formal specification contributes to the development of practical tests that can be executed by a testing tool. It also shows how a test oracle can be derived from a specification and used by the same testing tool to evaluate test results.

[1]  Leesa Murray,et al.  Specification-based class testing with ClassBench , 1998, Proceedings 1998 Asia Pacific Software Engineering Conference (Cat. No.98EX240).

[2]  Gordon A. Rose,et al.  Guidelines for the manual conversion of Object-Z to C , 1993 .

[3]  David Harel,et al.  Statecharts: A Visual Formalism for Complex Systems , 1987, Sci. Comput. Program..

[4]  Hans-Martin Hörcher,et al.  Improving Software Tests Using Z Specifications , 1995, ZUM.

[5]  Jeremy Dick,et al.  Automating the Generation and Sequencing of Test Cases from Model-Based Specifications , 1993, FME.

[6]  David J. Robson,et al.  A State-Based Approach to the Testing of Class-Based Programs , 1995, Softw. Concepts Tools.

[7]  Leesa Murray,et al.  Extending test templates with inheritance , 1997, Proceedings of Australian Software Engineering Conference ASWEC 97.

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

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

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

[11]  Robert V. Binder,et al.  Testing Object-Oriented Systems: Models, Patterns, and Tools , 1999 .

[12]  Leesa Murray,et al.  Formal Derivation of Finite State Machines for Class Testing , 1998, ZUM.

[13]  Roger Duke,et al.  Object-Z: a specification language advocated for the description of standards , 1995 .

[14]  J. Michael Spivey,et al.  The Z notation - a reference manual , 1992, Prentice Hall International Series in Computer Science.

[15]  Daniel Hoffman,et al.  The Testgraph Methodology: Automated Testing of Collection Classes , 1995, J. Object Oriented Program..

[16]  David A. Carrington,et al.  A Framework for Specification-Based Testing , 1996, IEEE Trans. Software Eng..

[17]  Philip Alan Stocks,et al.  Applying formal methods to software testing , 1993 .

[18]  Daniel Hoffman,et al.  ClassBench: A Methodology and Framework for Automated Class Testing , 1996 .

[19]  Susan Stepney Testing as Abstraction , 1995, ZUM.

[20]  David Chenho Kung,et al.  Developing an object-oriented software testing and maintenance environment , 1995, CACM.

[21]  Heinz Schmidt,et al.  Object test coverage using finite state machines , 1995 .

[22]  Jason McDonald,et al.  Translating Object-Z specifications to passive test oracles , 1998, Proceedings Second International Conference on Formal Engineering Methods (Cat.No.98EX241).

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

[24]  Boris Beizer,et al.  Software Testing Techniques , 1983 .