Automatic test data generation using constraint solving techniques

Automatic test data generation leads to identify input values on which a selected point in a procedure is executed. This paper introduces a new method for this problem based on constraint solving techniques. First, we statically transform a procedure into a constraint system by using well-known "Static Single Assignment" form and control-dependencies. Second, we solve this system to check whether at least one feasible control flow path going through the selected point exists and to generate test data that correspond to one of these paths.The key point of our approach is to take advantage of current advances in constraint techniques when solving the generated constraint system. Global constraints are used in a preliminary step to detect some of the non feasible paths. Partial consistency techniques are employed to reduce the domains of possible values of the test data. A prototype implementation has been developped on a restricted subset of the C language. Advantages of our approach are illustrated on a non-trivial example.

[1]  M. Wegman,et al.  Global value numbers and redundant computations , 1988, POPL '88.

[2]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

[3]  Lori A. Clarke,et al.  A System to Generate Test Data and Symbolically Execute Programs , 1976, IEEE Transactions on Software Engineering.

[4]  Bogdan Korel,et al.  Automated Software Test Data Generation , 1990, IEEE Trans. Software Eng..

[5]  James C. King,et al.  Symbolic execution and program testing , 1976, CACM.

[6]  Richard G. Hamlet,et al.  Exploring dataflow testing of arrays , 1993, Proceedings of 1993 15th International Conference on Software Engineering.

[7]  Bogdan Korel,et al.  The chaining approach for software test data generation , 1996, TSEM.

[8]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[9]  Hanspeter Mössenböck,et al.  Single-pass generation of static single-assignment form for structured languages , 1994, TOPL.

[10]  N. Malevris,et al.  Reducing the effects of infeasible paths in branch testing , 1989 .

[11]  Karl N. Levitt,et al.  SELECT - a formal system for testing and debugging programs by symbolic execution , 1975, Reliable Software.

[12]  Flavio De Paoli,et al.  Array Representation in Symbolic Execution , 1993, Comput. Lang..

[13]  Karl N. Levitt,et al.  SELECT—a formal system for testing and debugging programs by symbolic execution , 1975 .

[14]  Bowen Alpern,et al.  Detecting equality of variables in programs , 1988, POPL '88.

[15]  Pascal Van Hentenryck,et al.  Design, Implementation, and Evaluation of the Constraint Language cc(FD) , 1994, Constraint Programming.

[16]  Michael J. Maher,et al.  Constraint Logic Programming: A Survey , 1994, J. Log. Program..

[17]  William E. Howden,et al.  Symbolic Testing and the DISSECT Symbolic Evaluation System , 1977, IEEE Transactions on Software Engineering.

[18]  Antonia Bertolino,et al.  Automatic Generation of Path Covers Based on the Control Flow Analysis of Computer Programs , 1994, IEEE Trans. Software Eng..

[19]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1984, TOPL.

[20]  Bogdan Korel,et al.  A dynamic approach of test data generation , 1990, Proceedings. Conference on Software Maintenance 1990.

[21]  Mats Carlsson,et al.  SICStus Prolog User''s Manual , 1993 .

[22]  Bogdan Korel,et al.  Automated test data generation for programs with procedures , 1996, ISSTA '96.

[23]  Alan K. Mackworth Consistency in Networks of Relations , 1977, Artif. Intell..

[24]  A. Jefferson Offutt,et al.  Constraint-Based Automatic Test Data Generation , 1991, IEEE Trans. Software Eng..