Software is an indispensable part of people’s life,and software quality issues have become a hot topic of concern.Once software quality issues occur,they will cause enormous economic losses to society and even threaten people’s lives and health.Therefore,software testing plays a pivotal role in the software development process.Software testing can identify potential vulnerabilities in the software before it is put into operation,and timely repair the vulnerabilities to ensure stable and efficient operation of the software after it is put into use.Integration testing is an important stage in software testing,and the determination of class integration test order is a key issue in class integration testing.Reasonable class integration test order can reduce test stubs costs,thereby reducing test costs.In order to solve the problem of premature convergence of particle swarm optimization(PSO)algorithm when generating class integration test order for largescale programs,this thesis proposes a class integration test order generation method based on simulated annealing particle swarm optimization(SAPSO)algorithm.When particles have fallen into the local optimal value region,the introduction of annealing mechanism can make particles quickly leave the optimal region for further search.Experimental results show that this method can effectively slow down the convergence speed of particle swarm optimization algorithm,thereby obtaining a better solution.When generating class integration test orders based on particle swarm optimization algorithms and simulated annealing particle swarm optimization algorithms,the randomly generated initial population lacks guidance information on the evolution direction,resulting in a higher test stubs cost for the ultimately generated class integration test order.To address this deficiency,this thesis proposes an initial population optimization method based on dynamic linked lists.This method first introduces constraints which do not allow breaking strong dependencies between classes in the population initialization phase,analyzes static programs,and constructs strong dependency matrices.At the same time,in order to improve the efficiency of algorithm execution,strong dependency matrices are converted into Sparse Arrays;Then construct a single linked table based on a Sparse Array;Finally,merge the single linked list and add class nodes that have no dependencies or belong to weak dependencies to obtain a test order that meets the requirements.Repeat the above steps until an individual meets the population requirements is generated.The optimized initial population is used for particle swarm optimization and simulated annealing particle swarm optimization,respectively.Experimental results show that this method can reduce the cost of test stubs.Finally,a class integration test order generation tool(Heu CITO)is designed,which can visually display the results of six types of integration test order generation methods.This thesis has 41 figures,17 tables,and 80 references. |