In the current field of automatic test data generation,the genetic algorithm for solving the issue of difficult-to-covered edges in multi-path coverage is a research frontier.On the one hand,the existing methods with judging the difficulty of path coverage are considered under the node’s perspective so that the effect is not ideal yet.On the other hand,the genetic algorithm mainly searches for optimal solutions through fitness functions and calculates the fitness value of all individuals result in time-consuming.Moreover,the program more complexity,the issues become more pronounced.To address these issues,the following two improvement strategies are proposed.On the one hand,we propose an approach to multi-path coverage testing based on the both key edge probability and path layer proximity.Comprehensively considering the node and key edge information of paths,we can not only select difficultly-covered target paths more reasonably,but also guide the evolution of test data toward the target path more efficiently.In addition to the nested structure,programs which are executed in each node often have variable levels of difficulty.The utilization of path layer proximity can well reduce the impact of nested structures in test generation.However,the fitness value predicted with the grey prediction model can quickly lock excellent individuals and reduce the number of evolutionary generations output from the test data.Firstly,following difficultly-covered nodes which are located with the probabilities of the nodes being traversed and difficultly-covered edges(i.e.,key edges),the target paths will be generated.Secondly,the fitness function is designed from the individual contribution and the path layer proximity.The individual contribution is based on the key edge probability,as well as the path layer proximity is distilled from the path layer graph of the program.Finally,multi-population genetic algorithm is employed to generate test data in order to cover the target paths.After covering the current target path in the evolution process,the subpopulation covers other paths like the current target path.Experimental results show that compared with other similar classic methods,the stability of the proposed method is improved.At the same time,average generation time and average evolution time are priority.The standard deviation of the generation time increase is lower than the optimal one by 10.19% and the variation coefficient is decreased by 10.79%.The increased scale of the standard deviation of evolutionary time is lower than the optimal one by 19.98% and the variation coefficient is decreased by 28.02%,respectively.On the other hand,an approach to multi-path coverage testing is proposed,which is based on equilibrium optimization theory and grey prediction model.The influence of individuals is evaluated on the equilibrium degree of the program.Meanwhile,it can distinguish the advantages and disadvantages of individuals.In the proposed method,the fitness function can introduce more individuals to cross the hard-to-cover edge and guide the test data to evolve through the target path more effectively.In addition,it does not need to calculate the branch distance and layer proximity result in time-consuming decayed.Firstly,the fitness function is designed and calculated based on the equilibrium optimization theory.Secondly,the gray prediction model is trained by selected individuals of tested programs and corresponding values of fitness function.For the fitness value of predicted individuals is greater than the threshold,we calculate the accurate fitness value.Finally,multi-population genetic algorithm is employed to generate test data to cover the target paths.After covering the current target path in the evolution process,the subpopulation continually tries to cover other paths like the current target path.The experimental results show that compared with other similar classical methods,the average performance improvement of evolution time and evolution generation can achieve53.80% and 45.13%,respectively,within the priority of the overall coverage rate.The study’s purpose is to improve the efficiency of test case generation through reasonably designed fitness function and full utilization of the existing population individual information.Therefore,according to key edge probability and equilibrium optimization theory a novel approach with multi-path coverage testing strategies is proposed.The experiments show that the two proposed methods can quickly generate test data covering the target paths and validate the feasibility and effectiveness. |