Automated generation of test programs from closed specifications of classes and test cases

Most research on automated specification-based software testing has focused on the automated generation of test cases. Before a software system can be tested, it must be set up according to the input requirements of the test cases. This setup process is usually performed manually, especially when testing complex data structures and databases. After the system is properly set up, a test execution tool runs the system according to the test cases and pre-recorded test scripts to obtain the outputs, which are evaluated by a test evaluation tool. This paper complements the current research on automated specification-based testing by proposing a scheme that combines the setup process, test execution, and test validation into a single test program for testing the behavior of object-oriented classes. The test program can be generated automatically given the desired test cases and closed specifications of the classes. With closed specifications, every class method is defined in terms of other methods which are, in turn, defined in their own class specifications. The core of the test program generator is a partial-order planner which plans the sequence of instructions required in the test program. The planner is, in turn, implemented as a tree-search algorithm. It makes function calls to the Omega Calculator library, which solves the constraints given in the test cases. A first-cut implementation of the planner has been completed, which is able to handle simple arithmetics and existential quantifications in the class specifications. A soundness and completeness proof sketch of the planner is also provided in this paper.

[1]  David R. Barstow,et al.  Proceedings of the 25th International Conference on Software Engineering , 1978, ICSE.

[2]  Shaoying Liu,et al.  Generating test data from SOFL specifications , 1999, J. Syst. Softw..

[3]  William Pugh,et al.  The Omega test: A fast and practical integer programming algorithm for dependence analysis , 1991, Proceedings of the 1991 ACM/IEEE Conference on Supercomputing (Supercomputing '91).

[4]  Gregg Rothermel,et al.  An empirical study of regression test selection techniques , 2001, ACM Trans. Softw. Eng. Methodol..

[5]  Norihisa Suzuki,et al.  Implementation of an array bound checker , 1977, POPL.

[6]  Insup Lee,et al.  Automatic Test Generation From Statecharts Using Model Checking , 2001 .

[7]  Peter Norvig,et al.  Artificial Intelligence: A Modern Approach , 1995 .

[8]  Mary Lou Soffa,et al.  Using a goal-driven approach to generate test cases for GUIs , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[9]  Natarajan Shankar,et al.  PVS: Combining Specification, Proof Checking, and Model Checking , 1996, FMCAD.

[10]  Robert B. France,et al.  Generating test cases from an OO model with an AI planning system , 1999, Proceedings 10th International Symposium on Software Reliability Engineering (Cat. No.PR00443).

[11]  Michael R. Donat Automating Formal Specification-Based Testing , 1997, TAPSOFT.

[12]  Tsong Yueh Chen,et al.  An Overview of Integration Testing Techniques for Object-Oriented Programs , 2002 .

[13]  M. Scheetz,et al.  Generating test cases from an OO model with an AI planning system , 1999 .

[14]  Sriram Sankar,et al.  Specifying and Testing Software Components using ADL , 1994 .

[15]  Lawrence Charles Paulson,et al.  Isabelle/HOL: A Proof Assistant for Higher-Order Logic , 2002 .

[16]  Robert M. Poston Automating specification-based software testing , 1996 .

[17]  Tsong Yueh Chen,et al.  TACCLE: a methodology for object-oriented software testing at the class and cluster levels , 2001, TSEM.

[18]  William Pugh,et al.  A practical algorithm for exact array dependence analysis , 1992, CACM.

[19]  Adam A. Porter,et al.  Specification-based Testing of Reactive Software: Tools and Experiments Experience Report , 1997, Proceedings of the (19th) International Conference on Software Engineering.

[20]  David Gries,et al.  The Science of Programming , 1981, Text and Monographs in Computer Science.