Font Size: a A A

Research On Automatic Generation Of Multipath Coverage Test Cases Based On Genetic Algorithm

Posted on:2019-10-01Degree:MasterType:Thesis
Country:ChinaCandidate:T YaoFull Text:PDF
GTID:2428330578968173Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the development of the information industry,the application of software is becoming more and more extensive,and the quality of software has been paid more and more attention by various industries.Logical structure of complexity software,using artificial method to design the target path of the test case is difficult,therefore this paper proposed an improved technique of automatic generation of test cases.This technology will be improved by the infeasible path detection method based on multiobjective conditional statement correlation combined with the automatic generation of test cases based on genetic algorithm to generate more effective test cases.While guaranteeing the adequacy of the test,the redundancy of the test cases is reduced and the efficiency of the test is improved.Infeasible path problems exist in the basic path of the program have been studied.the main source of infeasible paths is the conditional statement between the path contains the correlation.Therefore,by researching the correlation between these conditional statements,can detect the infeasible path.In this paper,the theory and method of automatic detection of unreachable path based on conditional statement correlation are proposed,and the reachable path set of the program is generated.On the basis of generating reachable path set,the method of multipath coverage test case generation based on genetic algorithm is studied,and the mathematical model to solve the problem is put forward.Using genetic algorithm to generate test case to coverage target path,test case generation problem into an optimization problem,and then use genetic algorithm to solve the optimization problem of transformation.One of the prerequisites for efficient solution of multiobjective optimization problems is to design the fitness function.The proposed run genetic algorithm can generate multiple test cases covering multiple and target paths simultaneously,and the descendants are the individuals with the average value of all target path fitness values.In this method,the fitness function of descendants is represented by a vector,and each component of the vector represents the fitness value of a target for a each target path.The vector representation method proposed in this paper can describe the adaptive value of the evolutionary individual more accurately.When using traditional genetic algorithms to generate test cases,each intercalated program needs to be run to evaluate the performance of the test case.In view of this,we use the genetic algorithm based on multi-path coverage,and calculate the fitness of each target for each target path according to the distance between the target path and the evolutionary individual coverage path;Then,according to the individual fitness value,we determine whether there are expected test cases.If so,we save the test case and its covered target path,and simplify the multi-objective optimization problem.If not,we will use the appropriate method to evaluate the performance of the evolutionary individual.Finally,the operation of selection,crossover and mutation is implemented to generate new population.It is so iterated until the test cases are generated to cover all the target paths.In order to verify the correctness and advancement of the technology,a series of experiments were carried out based on an industrial program and three benchmark programs,and the experimental results were analyzed.Through the experimental analysis,the automatic generation method of multipath coverage test cases based on genetic algorithm proposed in this paper can improve the process of software testing automation,and effectively improve the efficiency of test case generation.This research is of great significance for software development institutions to improve software development capabilities,reduce software development costs,and further improve their market competitiveness.
Keywords/Search Tags:test case, infeasible path, genetic algorithm, multiobjective optimization
PDF Full Text Request
Related items