Automatic Test Data Generation for Data Flow Testing Using a Genetic Algorithm

One of the major difficulties in software testing is the automatic generation of test data that satisfy a given adequacy criterion. This paper presents an automatic test data generation technique that uses a genetic algorithm (GA), which is guided by the data flow dependencies in the program, to search for test data to cover its def-use associations. The GA conducts its search by constructing new test data from previously generated test data that are evaluated as effective test data. The approach can be used in test data generation for programs with/without loops and procedures. The proposed GA accepts as input an instrumented version of the program to be tested, the list of def-use associations to be covered, the number of input variables, and the domain and precision of each input variable. The algorithm produces a set of test cases, the set of def-use associations covered by each test case, and a list of uncovered def- use associations, if any. In the parent selection process, the GA uses one of two methods: the roulette wheel method or a proposed method, called the random selection method, according to the user choice. Finally, the paper presents the results of the experiments that have been carried out to evaluate the effectiveness of the proposed GA compared to the random testing technique, and to compare the proposed random selection method to the roulette wheel method.

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

[2]  Roy P. Pargas,et al.  Test‐data generation using genetic algorithms , 1999, Softw. Test. Verification Reliab..

[3]  Mario Jino,et al.  Identification of potentially infeasible program paths by monitoring the search for test data , 2000, Proceedings ASE 2000. Fifteenth IEEE International Conference on Automated Software Engineering.

[4]  Moheb R. Girgis Using symbolic execution and data flow criteria to aid test data selection , 1993, Softw. Test. Verification Reliab..

[5]  Yoichi Hayashi,et al.  Neural expert system using fuzzy teaching input and its application to medical diagnosis , 1994 .

[6]  Gary McGraw,et al.  Generating Software Test Data by Evolution , 2001, IEEE Trans. Software Eng..

[7]  Harlan D. Mills,et al.  Cleanroom Software Engineering , 1987, IEEE Software.

[8]  Marc Roper,et al.  Genetic Algorithms and the Automatic Generation of Test Data , 2007 .

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

[10]  John Cocke,et al.  A program data flow analysis procedure , 1976, CACM.

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

[12]  Zbigniew Michalewicz,et al.  Genetic Algorithms + Data Structures = Evolution Programs , 1992, Artificial Intelligence.

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

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

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

[16]  Elaine J. Weyuker,et al.  Selecting Software Test Data Using Data Flow Information , 1985, IEEE Transactions on Software Engineering.

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

[18]  Peter M. Maurer,et al.  Generating test data with enhanced context-free grammars , 1990, IEEE Software.

[19]  Jeffrey M. Voas,et al.  Predicting where faults can hide from testing , 1991, IEEE Software.

[20]  Bryan F. Jones,et al.  A Strategy for Using Genetic Algorithms to Automate Branch and Fault-Based Testing , 1998, Comput. J..

[21]  Jin-Cherng Lin,et al.  Automatic test data generation for path testing using GAs , 2001, Inf. Sci..

[22]  C. V. Ramamoorthy,et al.  On the Automated Generation of Program Test Data , 1976, IEEE Transactions on Software Engineering.

[23]  Erik D. Goodman,et al.  Automated Software Test Data Generation Using A Genetic Algorithm , 1994 .

[24]  Martin R. Woodward,et al.  An integrated system for program testing using weak mutation and data flow analysis , 1985, ICSE '85.

[25]  David E. Goldberg,et al.  Genetic Algorithms in Search Optimization and Machine Learning , 1988 .

[26]  Lalit M. Patnaik,et al.  Genetic algorithms: a survey , 1994, Computer.

[27]  D. E. Goldberg,et al.  Genetic Algorithms in Search , 1989 .

[28]  Bryan F. Jones,et al.  Automatic structural testing using genetic algorithms , 1996, Softw. Eng. J..

[29]  Phyllis G. Frankl,et al.  An Experimental Comparison of the Effectiveness of Branch Testing and Data Flow Testing , 1993, IEEE Trans. Software Eng..

[30]  John H. Holland,et al.  Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence , 1992 .