| In recent years,research on generating test cases for multiple path coverage using genetic algorithms has received widespread attention,but there is still room for improvement.On the one hand,during the iteration process of old and new populations,there may be excellent individuals from other sub-populations in the old population that have not been fully utilized,resulting in resource waste.On the other hand,a significant amount of resources are also consumed when calculating the fitness value of individuals.Based on this,the following two improvement strategies are proposed.Firstly,a multi-path coverage testing strategy based on path similarity transfer is proposed.In order to fully utilize the information of discarded individuals in the old population,path similarity is used as the basis for individual transfer,and excellent individuals are transferred to other subpopulations.In this strategy,individuals in the population necessarily cover individuals on reachable paths,and the number of individuals is much greater than the number of paths.Therefore,when comparing the number of individual paths with the number of target paths,the similarity is calculated repeatedly.To address this issue,a path similarity table is proposed to store previously calculated similarities.When an individual passes through a certain path again,the path similarity table can be queried to obtain the similarity relationship between the individual path and the target path set.By transferring excellent individuals in the subpopulation,the strategy aims to increase the number of excellent genes in some subpopulations and accelerate the evolution of subpopulations.Experimental comparisons with similar classical methods show that the average generation time of this strategy can be reduced by up to 44.64% and a minimum of10.76%,while the average evolutionary generation can be reduced by up to 35.08% and a minimum of 6.13%.These results indicate that this strategy can effectively improve the efficiency of test case generation.Secondly,a multi-path coverage testing strategy based on RBF neural network transfer is proposed.To reduce the time complexity of fitness value calculation,an RBF neural network is used to predict fitness values.The RBF neural network is combined with individual transfer,and fitness value is used as the basis for individual transfer,making the transferred individuals more excellent and increasing the stability of the algorithm.Firstly,a sufficient and comprehensive number of individuals are randomly generated,and their fitness values are calculated.Then,an RBF neural network with good local approximation ability is used to fit the fitness function curve.During the execution of the genetic algorithm,only the individuals are input into the model to obtain their fitness values.When transferring individuals,the fitness values predicted by the model are used,greatly reducing the time complexity of the algorithm.The results of ablation experiments show that compared with the RBF neural network method,individual transfer method,and instrumentation method,the average generation time of this strategy can be reduced by 10.94%,9.61%,and 15.29%,respectively,and the average evolutionary generation can be reduced by 10.37%,5.98%,and 11.08%,respectively.In addition,the individual transfer rate of this strategy is on average 12.27%,effectively increasing the number of excellent individuals.This thesis investigates the problem of generating test cases for multiple path coverage from two aspects: insufficient sharing of individual information and excessive resource consumption in fitness function calculation.The individual transfer strategy is used to fully utilize individual information,and the path similarity table is used to reduce the time complexity of duplicate calculation of path similarity,in order to improve the algorithm efficiency.A trained RBF neural network model is used to predict fitness values and reduce the time complexity of fitness value calculation.Experiments with both strategies show that they are feasible and effective.Compared with similar classical methods,the proposed strategies in this thesis perform better in five evaluation indicators,such as coverage rate. |