Font Size: a A A

Test Case Generation Method Base On Improved Particle Swarm Optimization

Posted on:2018-09-20Degree:MasterType:Thesis
Country:ChinaCandidate:Y J YangFull Text:PDF
GTID:2348330512979792Subject:engineering
Abstract/Summary:PDF Full Text Request
As one of software testing methods based on protocol,combinatorial testing aims at selecting a small but effective set of test cases from the huge combinatorial space faced by the software under test to generate a set of test cases with high coverage and strong ability of disclosing.However,the combined test case generation is a NP complete problem,which needs to solve the combinatorial problem in polynomial time.Therefore,a meta-heuristic search algorithm is needed to solve this problem.Compared with other meta-heuristic search algorithms,Particle Swarm Optimization(PSO)is more competitive in scale generation and execution time.In this paper,we review and summarize the existing research results of using PSO to generate the set of test cases.In view of the problem of variable velocity combinatorial testing and parameter selection of PSO,we combine an improved one-test-at-a-time strategy and an adaptive particle swarm optimization(PSO)algorithm to handle arbitrary coverage intensity.The main contributions of this paper are summarized as follows:(a)A method similar to the avoidance strategy is proposed to pre-treat the constraint condition,and the invalid constraint combination is eliminated before the test case is generated.To a certain extent,it is necessary to cover the size of the combination set to avoid the fitness error caused by the invalid combination.(b)For the selection problem of one-test-at-a-time strategy combination,this paper proposes two priority measurement methods surrounding the priority of the combination and the priority of the factor,which are coverage measurement method and factor value measurement method.In the process of generating a single test case,the combination with the largest weight is selected for generating a single test case,which avoids the randomness and blindness of the original algorithm.(c)According to the parameter configuration of particle swarm optimization algorithm,the parameters of inertia weight,learning factor,population size and iteration number are set respectively,which makes PSO more suitable for the generation of overlay table.For the inertia weight,the inertia weight is adjusted adaptively according to the merits of the particles,and the distance between the particle and the current global optimal solution is taken as the evaluation standard.For the learning factor,a dynamic adjustment strategy of learning factors is proposed,which makes the learning factors change with different iterative processes.At same time,the size of population and the number of iterations are discussed in detail,and set the corresponding value for the combination set size.In order to verify the effectiveness of the proposed improvement strategy,we adopt MATLAB programming to implement the improved algorithm,and combine these approaches to the original particle swarm optimization algorithm in test suite size and generation time,the results show the competitiveness of this approach.
Keywords/Search Tags:Combination testing, Covering array generation, Particle swarm optimization, Adaptive algorithm
PDF Full Text Request
Related items