Font Size: a A A

Research On Test Case Generation And Prioritization Based On Improved Particle Swarm Optimization

Posted on:2020-10-04Degree:MasterType:Thesis
Country:ChinaCandidate:S N TengFull Text:PDF
GTID:2428330572468590Subject:Engineering
Abstract/Summary:PDF Full Text Request
In software engineering,the use of intelligent search algorithms to study test case generation and prioritization problems is an effective method.In intelligent search algorithms,particle swarm optimization is more competitive and therefore widely used.The regression test indicates that the modified software was repeatedly tested to confirm that no new defects were generated.In the software development process,frequent use of regression testing can ensure the quality of the software,so prioritizing test cases can reduce the cost of regression testing.In recent years,intelligent search algorithm has also been applied to test case prioritization.This paper summarizes the research results of particle swarm optimization algorithm on test case generation and ranking.Aiming at the problem of premature convergence and easy to fall into local extremum,a test case generation method based on improved particle swarm optimization is proposed by improving the learning factor and combining reverse learning with re-search.Chaotic search and particle swarm optimization are combined and applied to test case prioritization.The main research work and contributions of this paper are summarized as follows:(1)Aiming at the parameter setting problem of particle swarm optimization,the improved strategy is to modify the Tent parameter,inertia weight and learning factor.The introduction of parameters in Tent mapping can prevent particles from falling into a small period.At the same time,the three characteristics of Tent mapping are used to initialize and optimize the population so as to make the particles uniformly distributed and improve the quality of the initial solution.The learning factor which changes with the non-linear decline of inertia weight is introduced to balance the global exploration and local of the algorithm.At the same time,in order to match the non-linear changes in the process of algorithm,the common exponential function decline method is used for inertia weight.(2)Aiming at the problem of particle falling into local extremum after several iterations,two methods are used to improve it.First,the gradient descent method is used to complete the re-search of the optimal solution and the sub-optimal solution.The taboo region is set with the extreme point as the center,and the particles outside the taboo region are retrieved to ensure that the optimal solution is quickly found and the convergence accuracy is improved.Secondly,chaotic search is introduced to optimize the current algebraic optimal particle of the population,to jump out of the local optimum,at the same time,some of the worst particles in the current population are chaotic optimized to improve the diversity of the population.(3)Aiming at the problem of test case generation and prioritization,the static analysis is carried out through the program,and then the fitness function is constructed by the branch distance method.Its size is used as the evaluation value to improve the efficiency of test case generation.At the same time,the multi-objective optimization strategy is adopted to achieve the goal of test case prioritization.In order to verify the effectiveness of the improved particle swarm optimization algorithm in test case generation and prioritization applications,a series of benchmark functions and programs were selected for experiments,and the test case generation technology was evaluated and analyzed from three aspects: algorithm performance,average coverage rate and average iteration times;and the standardized defect detection rate was also discussed.The test cases prioritization is evaluated and analyzed from four aspects: algorithm performance?branch coverage and effective execution time.The experimental results show that the improved method proposed in this paper has advantages over other particle swarm optimization algorithms in these indicators.
Keywords/Search Tags:Software testing, Particle swarm optimization, Chaos algorithm, Test case generation, Test case prioritization
PDF Full Text Request
Related items