Font Size: a A A

Based On The Path Of The Pso Research And Implementation Of Automatic Generation Of Test Data Method

Posted on:2013-12-11Degree:MasterType:Thesis
Country:ChinaCandidate:G L ChenFull Text:PDF
GTID:2248330374485712Subject:Information and Communication Engineering
Abstract/Summary:PDF Full Text Request
Particle Swarm Optimization (PSO) has advantages of simple realization, highconvergence rate and great versatility. PSO can generate the test data for path testingquickly, and hold great importance of significance to improve the efficiency of softwaretest and reduce costs of software development. But the algorithm may fall into aprecocious statement easily and waste resources, because of its low search capability. Inthis thesis, we study the use of PSO algorithm in automatic test data generation in pathtesting, and bring some improvement to overcome the shortcomings. The main contentsare as follows:First,the method of using the PSO algorithm in test data generation is studied, andtwo key issues about the construction of fitness function and the setting of algorithmparameters are discussed.Second, we studied the motion track of test data, providing the differences of themotor patterns of test data in search space, and combined with K-means clusteringalgorithm, the particles in the PSO algorithm were clustered.Third, AIC-PSO algorithm which is the improved algorithm based on adaptivestrategy, is proposed. We measure the intensity of each cluster in the clustering of thePSO algorithm by using cluster index CI in the adaptive strategy, which is the adjustedbasis of the weighting factor W. The comparative experiments between algorithmAIC-PSO algorithm and the other improved PSO algorithms show that, AIC-PSOalgorithm can not only improve the generating efficiency of test data, but also increasethe diversity of particles in PSO algorithm, preventing precocious effectively.Forth, SP-PSO algorithm which is the improved algorithm based on simple strategy,is proposed. Based on K-means, SP-PSO algorithm suggests secondary clusteringalgorithem to cluster the particles of PSO algorithm. The cluster index CI represents theintensity of particles in cluster, and as well, CI shows the sign of using simple strategyor not. The comparative experiments between SP-PSO algorithm and the otherimproved PSO algorithms show that, SP-PSO algorithms can reduce the algorithmconsumptions of resource, and has higher efficiency in test data generating. Fifth, we implement a test data generation tool in Java. The result shows that thetool can generate test data for the target path of the program under test effectively.
Keywords/Search Tags:Automatic Test Data Generation, PSO algorithm, clustering, adaptive, simple
PDF Full Text Request
Related items