Font Size: a A A

Research On Test Case Generation Technology Based On Gravitational Search Algorithm

Posted on:2020-09-05Degree:MasterType:Thesis
Country:ChinaCandidate:Z D ZhaoFull Text:PDF
GTID:2428330572468595Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Test case generation is an important branch of software testing research.Using intelligent search algorithm to generate test cases is one of the hotspots in the research of test case generation.At present,most of the research is to improve genetic algorithm,particle swarm optimization,simulated annealing algorithm and apply them to test case generation,but these algorithms have their own shortcomings.For example,the genetic algorithm is precocious,the local search ability is weak,the convergence rate is slow in the later period of the search,the particle swarm algorithm is easy to be precocious and fall into the local optimal.The structure of the simulated annealing algorithm is more complex and the optimization time consuming is relatively long.These shortcomings affect the quality and efficiency of test case generation in application.In addition,at present,the intelligent search algorithm is applied to multi-path test case generation and combined test case generation,and the improvement of fitness function,the key index for evaluating particle quality,is not ideal.Therefore,this paper proposes an improved Tent chaotic gravitational search algorithm(ITCGSA)based on the improvement of the gravitational search algorithm(GSA),and applies it to the generation of multipath test cases and the generation of combined test cases,and the main research work and content are summarized as follows:(1)Based on the analysis of the advantages and disadvantages of GSA algorithm,ITC-GSA algorithm is proposed.The Tent chaotic map is improved to initialize the population,the dynamic adjustment strategy of gravitational constant G is introduced to improve the convergence speed and accuracy of the algorithm,the maturity index is designed to judge the population maturity,and the premature convergence of the algorithm is effectively suppressed by using Tent chaotic search to help the population jump out of local optimum.(2)Multi-path test case generation based on ITC-GSA algorithm is proposed.In view of the characteristics of multipath test case generation,based on the analysis of the branch distance method and the layer proximity method,a new calculation method of fitness is proposed.It dynamically adjusts the fitness function value according to the adaptive weight of the newly generated test case,and improves the quality and efficiency of the multipath test case generation.(3)Propose the combination test case generation based on ITC-GSA algorithm.According to the characteristics of combination test,combining the average Hamming distance and the coverage intensity,the influence of the test case focused on the test cases generated in the combined test is taken into consideration to guide the generation of new test cases,and a new calculation method of fitness function is designed.In order to verify the validity of the fitness function designed and applied in multi-path test case generation and combination test case generation,a series of experiments are designed to verify the effectiveness of the proposed algorithm.The experimental results show that ITC-GSA algorithm has obvious advantages over GSA algorithm in fast convergence speed,high optimization accuracy,and can effectively jump out of local optimum.For the multi-path test case generation problem,the improved algorithm and fitness function are better than genetic algorithm,particle swarm optimization and GSA algorithm in iteration times.Less,shorter running time and higher average success rate.For the combined test case generation problem,the proposed algorithm and fitness function improvements have greatly improved the scale and time of test case generation compared with genetic algorithm,particle swarm optimization and GSA algorithm.
Keywords/Search Tags:software testing, gravitational search algorithm, multipath testing, combination testing, fitness function
PDF Full Text Request
Related items