Font Size: a A A

Research On Multi-path Test Data Generation Method Based On Genetic Algorithm

Posted on:2024-02-05Degree:MasterType:Thesis
Country:ChinaCandidate:M F ChengFull Text:PDF
GTID:2568307058460204Subject:Applied Mathematics
Abstract/Summary:PDF Full Text Request
Genetic algorithm-based automatic generation of multi-path coverage test data was created to solve the problems of error-prone manual testing and high testing costs,and has been widely used in the field of software testing as an efficient white-box testing technique.With the complexity of software scale and function,there are still difficult problems that need to be further solved: such as the problem of premature convergence of the algorithm,the problem of falling into local optimum due to the single population diversity,the low efficiency of test data generation in a large search range,the lack of theoretical guidance and the difficulty of algorithm design.To address the above problems,this paper investigates methods to improve the efficiency of multi-path coverage test data generation.The main work is as follows.1.In the problem of test data generation based on traditional genetic algorithms,the prob-lems of premature convergence and low path coverage tend to occur.An improved ge-netic algorithm with good point sets is proposed for the generation of multi-path cover-age test data,taking advantage of the small error and high accuracy of good point sets.The algorithm first generates the initial population based on a chaotic learning strategy;then improves the crossover operator of the genetic algorithm using the good point set and chaotic methods,and designs an adaptation function that considers the combination of similarity and branch distance between individual traversal paths and the target path matrix; experiments show that the proposed algorithm can effectively alleviate the prob-lems of premature convergence and low path coverage caused by the low accuracy of the crossover operator.2.Based on the proposed good point set genetic algorithm,a migration-based parallel pop-ulation genetic algorithm test data generation method is proposed for software with high similarity and large search space,which is used to solve the problem of poor search ef-ficiency arising in test data generation.First,a one-dimensional linear chaotic mapping and a backward learning method are used to generate the reverse population; then,an improved fitness function combining layer proximity and branch distance is designed; fi-nally,the branch distance information of individuals crossing the path is used to improve the search efficiency of the uncovered path test data by interpolating the path.During the iterative process of the algorithm,various inter-population settings of the migration operator generate elite populations,and a pre-selection strategy is used within the reverse population to dynamically optimise the offspring population.Theoretical analysis and experimental validation illustrate the effectiveness of the method.3.The emergence of numerous algorithms has expanded the search scope of software pro-grams,and how to determine the suitable algorithm to solve the test data generation prob-lem poses a serious challenge,so how to choose the appropriate heuristic algorithm to guide the generation of test data has become another challenge.To this end,Based on the research of the two improved methods mentioned above,a test data generation method based on a superheuristic algorithm is proposed.Firstly,a model of the test data genera-tion method based on the superheuristic algorithm is established; then,a random selection mechanism is adopted for the high-level strategy layer of the superheuristic algorithm,and a library of six algorithms is constructed by combining three different crossover operators and two variational operators designed in conjunction with the test data generation prob-lem at the lower level; experiments on the benchmark and industrial programs illustrate the effectiveness of the method.
Keywords/Search Tags:genetic algorithm, multi-path coverage criterion Artificial, test data generation, good point, Parallel population, hyperheuristic algorithm
PDF Full Text Request
Related items