Automated test data generation using an iterative relaxation method

An important problem that arises in path oriented testing is the generation of test data that causes a program to follow a given path. In this paper, we present a novel program execution based approach using an iterative relaxation method to address the above problem. In this method, test data generation is initiated with an arbitrarily chosen input from a given domain. This input is then iteratively refined to obtain an input on which all the branch predicates on the given path evaluate to the desired outcome. In each iteration the program statements relevant to the evaluation of each branch predicate on the path are executed, and a set of linear constraints is derived. The constraints are then solved to obtain the increments for the input. These increments are added to the current input to obtain the input for the next iteration. The relaxation technique used in deriving the constraints provides feedback on the amount by which each input variable should be adjusted for the branches on the path to evaluate to the desired outcome.When the branch conditions on a path are linear functions of input variables, our technique either finds a solution for such paths in one iteration or it guarantees that the path is infeasible. In contrast, existing execution based approaches may require an unacceptably large number of iterations for relatively long paths because they consider only one input variable and one branch predicate at a time and use backtracking. When the branch conditions on a path are nonlinear functions of input variables, though it may take more then one iteration to derive a desired input, the set of constraints to be solved in each iteration is linear and is solved using Gaussian elimination. This makes our technique practical and suitable for automation.

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

[2]  E. F. Miller,et al.  Automated generation of testcase datasets , 1975, Reliable Software.

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

[4]  Norman R. Lyons,et al.  An automatic data generating system for data base simulation and testing , 1977, SIML.

[5]  I. Williams,et al.  SCHAUM ' S OUTLINE ' SERIES , 2022 .

[6]  V. Lakshmi Narasimhan,et al.  ADTEST: A Test Data Generation Suite for Ada Software Systems , 1997, IEEE Trans. Software Eng..

[7]  Norman R. Lyons An automatic data generating system for data base simulation and testing , 1977, DATB.

[8]  Jonathan A. Bauer,et al.  Test Plan Generation Using Formal Grammars , 1979, ICSE.

[9]  Carlos Urias Munoz,et al.  Automatic Generation of Random Self-Checking Test Cases , 1983, IBM Syst. J..

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

[11]  J. Douglas Faires,et al.  Numerical Analysis , 1981 .

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

[13]  David L. Spooner,et al.  Automatic Generation of Floating-Point Test Data , 1976, IEEE Transactions on Software Engineering.

[14]  J. Richard Kane,et al.  ATLAS-An Automated Software Testing System , 1976, ICSE '76.

[15]  Arnaud Gotlieb,et al.  Automatic test data generation using constraint solving techniques , 1998, ISSTA '98.

[16]  James H. Cross,et al.  A Rule-Based Software Test Data Generator , 1991, IEEE Trans. Knowl. Data Eng..

[17]  J. Miller Numerical Analysis , 1966, Nature.

[18]  Christian H. Bischof,et al.  ADIC: an extensible automatic differentiation tool for ANSI‐C , 1997, Softw. Pract. Exp..

[19]  E. F. Miller,et al.  Automated generation of testcase datasets , 1975 .