Font Size: a A A

Research And Application Of Test Case Generation Based On Improved Hybrid Genetic Algorithm

Posted on:2020-12-07Degree:MasterType:Thesis
Country:ChinaCandidate:L XuFull Text:PDF
GTID:2428330578458240Subject:Electronic and communication engineering
Abstract/Summary:PDF Full Text Request
Software testing is an effective way to maintain a high quality and it plays an important role in all the phases of software development.Test case design is the first and key step in testing.Nowadays,software testing becoming more automatic than ever.By utilizing automatic testing scripts and tools,it saves a lot of time and human efforts and avoids subjective faults.However,state-of-art testing tools and algorithms have significant drawbacks,e.g.,most testing cases still need much manual design and generation.With the expansion of software scale and a more complex software routes,traditional methods find it difficult to meet all the requirements.Hardly can it cover all the paths and it is prone to make mistakes.In this thesis,we concentrate on the improvement of software testing and show how to cut down on testing costs and promote efficiency.Firstly,we explain relative theories of software testing,including definition and generation procedure.Then we elaborate how the genetic algorithm could work in automatic test cases generation.In this thesis,various methods and related technologies are systematically summarized and compared,and then artificial intelligence technology in this field will play a big role.Secondly,this thesis introduces the genetic algorithm and simulated annealing algorithm in detail,and focuses on the implementation of genetic algorithm in the automatic generation of test cases,including parameter coding design,fitness function design and genetic operator design.Then analyze the feasibility of standard genetic algorithm in the automatic generation of test cases.The implementation principle and implementation process of simulated annealing algorithm are introduced.The advantages and disadvantages of the two algorithms are analyzed.The genetic algorithm is easy to fall into the local optimal solution and the target path coverage is low.In this thesis,a hybrid simulated annealing genetic algorithm is proposed and used in the automatic generation of test cases.Then,this thesis introduces the system framework of simulated annealing genetic algorithm applied to the automatic generation of test cases,and improves the key techniques of simulated annealing genetic algorithm: aiming at the accuracy of individual evaluation,the improvement of fitness function A new path-oriented similarity calculation method is combined with branch distance as the fitness function;multi-point crossover technique is adopted for the crossover operation;then the appropriate modification is made for the mutation operation,and adaptive mutation is adopted.Based on this,a hybrid simulated annealing algorithm is proposed.The improved algorithm can converge quickly and achieve optimality,avoiding falling into local optimum.Finally,in the experimental analysis part,a test data aid based on the improved simulated annealing genetic algorithm is designed.Experiments were carried out using 3 benchmark programs and 1 actual program.The experimental conclusion is drawn: the simulated annealing genetic algorithm has great advantages in generating the optimal number of test cases and has good convergence.
Keywords/Search Tags:test case, genetic algorithm, simulated annealing genetic algorithm, automatic test generation
PDF Full Text Request
Related items