Test-data generation using genetic algorithms

Roy P. Pargas, Mary Jean Harrold, Robert R. Peck

Software Testing Verification and Reliability · 1999 · 588 citations · 17 references

Concepts

TL;DR

A genetic algorithm is a heuristic that mimics natural evolution to search for optimal solutions. This paper presents a technique that uses a genetic algorithm for automatic test‑data generation. The authors implemented the technique in a tool called TGen, using a genetic algorithm to generate test data that exercises specific program elements, evaluated it against a random generator on six programs for statement and branch coverage, and employed parallel processing to accelerate the search. © 1999 John Wiley & Sons, Ltd.

Abstract

This paper presents a technique that uses a genetic algorithm for automatic test-data generation. A genetic algorithm is a heuristic that mimics the evolution of natural species in searching for the optimal solution to a problem. In the test-data generation application, the solution sought by the genetic algorithm is test data that causes execution of a given statement, branch, path, or definition–use pair in the program under test. The test-data-generation technique was implemented in a tool called TGen, in which parallel processing was used to improve the performance of the search. To experiment with TGen, a random test-data generator called Random was also implemented. Both Tgen and Random were used to experiment with the generation of test-data for statement and branch coverage of six programs. Copyright © 1999 John Wiley & Sons, Ltd.

References

17