Font Size: a A A

Study On The Automatic Generation Of Test Data Based On Improved SFL-PSO Algorithm

Posted on:2018-06-30Degree:MasterType:Thesis
Country:ChinaCandidate:X AnFull Text:PDF
GTID:2348330518998531Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Software testing was an important method to improve software quality. Automated testing played an important role in increasing the efficiency of software testing. The automatic generation of test data was the core of automatic testing, which aimed to reduce the burden of artificially generated test data and enhance efficiency of test data generation.Particle swarm optimization algorithm had the advantages of less parameters, stronger global search ability and faster convergence than genetic algorithm, ant colony algorithm, analog degradation algorithm and other test data generation algorithm. But in the later stage of evolution, the lack of diversity of particles-led to the population easy to fall into local optimum, prematurity and slow convergence speed.SFL-PSO algorithm could reduce the occurrence of premature problem effectively by keeping population diversity. However, the grouping idea of the algorithm made the difference between the groups very small,which led to the less diversity of the population. Moreover, the inertia weight and three learning factors were limited to a constant value, which caused low efficiency when dealing with premature problems.In this thesis, SFL-PSO was optimized to raise the efficiency of test data generation. First, the grouping method based on shuffle algorithm was used to improve the existing grouping methods. The difference within the group and between the groups became larger. And the purpose of increasing population diversity was achieved. Second, the dynamic adjustment strategy of inertia weight, which based on the variance of the fitness, was adopted. When the fitness variance was less than the threshold value, the inertia weight was increased by adjustment factor. so as to enlarge the search range, jump out the local optimum. The experimental results showed that the efficiency of the algorithm was the highest when the threshold was 0.1. Third, three learning factors were assigned to the weight of the fitness value of the individual optimal value,the global optimal value of the group and the global optimal value of the population in the sum of three fitness values. This could promote the particle learning from the optimal particle in population and speed up the convergence of the algorithm. And the experimental results showed that the efficiency of this method was higher than that of traditional method.In addition, the experiments showed that the algorithm had better performance when the maximum of iterations within group was 5-11 times. Finally, several typical benchmark programs were used as test programs. What's more, the target path test data was generated' by using PSO, SPSO,SFL-PSO and the improved SFL-PSO to verify the performance of the algorithm. The results showed that the improved algorithm had higher success rate and better stability. And the improved algorithm had better performance than SFL-PSO in terms of the number of iterations and the running time.
Keywords/Search Tags:automatic generation of test data, SFL-PSO, inertia weight, the learning factor, the number of iterations
PDF Full Text Request
Related items