Font Size: a A A

Test Case Generation Based On Multi-Objective Genetic Algorithm

Posted on:2024-05-24Degree:MasterType:Thesis
Country:ChinaCandidate:C Y HuangFull Text:PDF
GTID:2568307070451944Subject:Electronic information
Abstract/Summary:PDF Full Text Request
Software testing is the main method for testers to ensure product quality,and test cases are a very important part of testing.Executing good test cases is the key to comprehensive and effective testing.Although the current test case generation method combined with deep learning has achieved excellent results,it generally requires manual design of training sets.Test case generation is essentially an objective optimization problem.By transforming test case generation into an objective optimization problem,using heuristic algorithms to solve it is a relatively mature solution.Since there are often multiple paths to be covered in the test case generation problem,the multi-objective genetic algorithm is very suitable for solving this kind of problem.In addition,due to the particularity of the test case generation problem,each test case can only cover one goal,so although the individuals are connected to each other,it is slightly different from the Pareto optimal solution in multi-objective optimization.This paper converts the problem of generating test case coverage paths into a multi-objective optimization problem,proposes a multi-objective optimization model and designs an adaptive target multi-objective genetic algorithm ATMOGA(Adaptive Target Multi-Objective Genetic Algorithm),by improving NSGA-III(Non-dominated Sorting Genetic Algorithm III)algorithm to solve the problem of test case generation.The ATMOGA algorithm improves the fitness function in a targeted manner and allows individual definition of its impact factors.The algorithm uses an archive set to save individuals covering the target,and continuously updates the target path set in iterations.Then a method for generating an initial population is proposed,which can combine custom test cases with randomly generated test cases to increase population diversity and find targets faster.Based on the above method,this paper implements a test case generation system.To verify its effectiveness,we conduct experiments on three benchmark programs,one open source program and one enterprise program,comparing the ATMOGA algorithm with other similar algorithms.The experimental results show that the ATMOGA algorithm has a better performance in solving the problem of test case generation,and can generate high-quality test cases for testers.
Keywords/Search Tags:Test Case Generation, Multi-objective Genetic Algorithm, ATMOGA, Fitness Function, Initial Population
PDF Full Text Request
Related items