Font Size: a A A

Test Case Generation Based On Multi-objective Evolutionary Algorithm

Posted on:2017-03-02Degree:MasterType:Thesis
Country:ChinaCandidate:Z Q ZengFull Text:PDF
GTID:2428330488976201Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Software testing is an important means of ensuring software quality.Generation of test cases is a prerequisite for success of software testing.Test data generation problem essentially is an optimization problem,which makes the existing optimization methods be used for the generation of test data.The common approachs include as follows:random approach,constraint-solving approach,metaheuristic search approach,and so on.The metaheuristic search approach,also known as search-based test generation(SBST),is regarded as the most promising automatic test generation method.The problem of test generation is reformulated as a mathematical optimization problem,and solved using the heuristic search algorithm.Application of search-based techniques with respect to the automatic test generation problem of object-oriented software has made significant progress.At present,test evolutionary prototype tool,such as eToc,EvoUnit,Evacon,TestFul and EvoSuite,can be used to test case automatic generation of object-oriented software.The EvoSuite is excellent open-source testing framework based on WBGA(Whole Suite Based Genetic Algorithm),equipped with generation of effective test cases set.However,the high cost of testing,seriously affect the wide application of EvoSuite in the practical software testing.In order to efficiently generate test cases with high branch coverage set,this paper proposes a novel scalable test case generation method,namely PMOGA(Preference-based Multiple-Objective Genetic Algorithm).The new approach meets branch coverage criteria and generates test cases based on multi-objective genetic algorithm containing preference criterion.Firstly,we reformulate branch coverage as a multi-objective optimization problem,propose multi-objective optimization model based on the test data generation problem;secondly,we put forword the preference relationship based on rank to reduce the individual number of Pareto front,increasing the individual selection pressure,speed up the convergence rate,use extra archive to store excellent solution;thirdly,designate reasonable fitness function and evolution strategy;finally,we implement the local search of the best individual in the population using a local search strategy based on the PMOGA algorithm,which enhances the local search precision and further decreases the overhead of test case generation.The novel approach has been implemented in the open source EvoSuite framework in order to verify the validity of proposed approach,PMOGA is compared with WBGA in the tests of two benchmarks and four open source programs.Finally,the paper performs the experimental contrast of LS-PMOGA and PMOGA.Experimental results reveal that PMOGA is more effective than WBGA in generating test cases,and can generate test cases with higher branch coverage.exploration of local search improves the algorithm's local search precision and further improve the efficiency of test case generation.
Keywords/Search Tags:SBST, Multi-objective Evolutionary Algorithm, PMOGA, Local Search
PDF Full Text Request
Related items