Abstract

When Genetic Algorithm is used to evolve test data for path coverage, if the similarity of some test data of initial population is high, it will cause the lack of diversity of individuals, which directly affects the rate of optimal solution at subsequent evolution generation. A method for evolutionary generation of test data based on reduction of initial population data is proposed. A program will be expressed as a binary tree according to the branch number of the tested program. And all the executable paths of a program will be represented as binary encoding, different path of that program are obtained, test data reduction is conducted according to the similarity. The reduced data are evolved as the initial population of the Genetic Algorithm to generate test data to meet the requirements. The proposed method is used to generate test data of three benchmark programs, and compared with existing method, the experimental results show that the proposed method can effectively generate test data after reduction of initial population data, and have better performance in the number of generations and running time.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call