The automatic generation of test cases oriented paths in an effective manner is a challenging problem for structural testing of software. The use of search-based optimization methods, such as genetic algorithms (GAs), has been proposed to handle this problem. This paper proposes an improved adaptive genetic algorithm (IAGA) for test cases generation by maintaining population diversity. It uses adaptive crossover rate and mutation rate in dynamic adjustment according to the differences between individual similarity and fitness values, which enhances the exploitation of searching global optimum. This novel approach is experimented and tested on a benchmark and six industrial programs. The experimental results confirm that the proposed method is efficient in generating test cases for path coverage.
The design of automatic generation technology of test case is an important part of the software test automation implementation, having an important guiding role in testing of late work, which is the fundamental guarantee to improve the reliability of software. In this paper, considering the lack of adequacy of control flow testing, using the data flow testing as the test adequacy criteria, and then on the basis of the single population genetic algorithm search efficiency is not high, combining with previous methods on the improvement of the genetic algorithm, introducing the concept of multi-population, and then designs a kind of improved parallel evolutionary algorithm (IPEA) based on multipopulation is used to automatically generate test cases. The algorithm defined the concept of external pressure which as the degree of competition between individuals. Fully considering the influence of coverage, branch condition and degree of competition between individual species of three aspects, and give different weights, we design a fitness function to evaluate the merits of the individual species. Experiments show that the IPEA has obviously improved in convergence speed, search time, coverage, scale of the test cases on key performance than the single population genetic algorithm and random search algorithm.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.