From Object-Z Specifications to ClassBench Test Suites

This paper describes a method for specification-based class testing that incorporates test case generation, execution, and evaluation based on formal specifications. This work builds on previous achievements in the areas of specification-based testing and class testing by integrating the two within a single framework. The initial step of the method is to generate test templates for individual operations from a specification written in the Object-Z specification language. These test templates are combined to produce a finite state machine for the class that is used as the basis for test case execution using the ClassBench test execution framework. An oracle derived from the Object-Z specification is used to evaluate the outputs. The method is explained using a simple example and its application to a more substantial case study is also discussed.

[1]  Marie-Claude Gaudel,et al.  Testing Can Be Formal, Too , 1995, TAPSOFT.

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

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

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

[5]  Robert V. Binder,et al.  Testing object‐oriented software: a survey , 1996 .

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

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

[8]  Roger Duke,et al.  Formal Object Oriented Specification Using Object-Z , 2000 .

[9]  Erich Mikk,et al.  Compilation of Z Specifications into C for Automatic Test Result Evaluation , 1995, ZUM.

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

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

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

[13]  Kai-Hsiung Chang,et al.  Testing object-oriented programs: from formal specification to test scenario generation , 1998, J. Syst. Softw..

[14]  Robert M. Hierons Testing from a Z Specification , 1997, Softw. Test. Verification Reliab..

[15]  Wendy Johnston A Type Checker for Object-Z , 1996 .

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

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

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

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

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

[21]  David Lorge Parnas,et al.  Using Test Oracles Generated from Program Documentation , 1998, IEEE Trans. Software Eng..

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

[23]  Daniel Hoffman,et al.  Programmatic testing of the Standard Template Library containers , 1998, Proceedings 13th IEEE International Conference on Automated Software Engineering (Cat. No.98EX239).

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

[25]  Jonathan P. Bowen,et al.  Ten Commandments of Formal Methods , 1995, Computer.

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

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

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

[29]  Leesa Murray,et al.  TinMan-a test derivation and management tool for specification-based class testing , 1999, Proceedings Technology of Object-Oriented Languages and Systems. TOOLS 32.

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

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

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