Font Size: a A A

Automatic Generation And Optimization Of Test Cases Based On Mutation Testing

Posted on:2020-10-21Degree:MasterType:Thesis
Country:ChinaCandidate:Y Q DuFull Text:PDF
GTID:2428330611496114Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Software testing is a kind of technique which improves the quality of software by triggering defects in the software.A core key in software testing is to find a suitable method by which to obtain a high-quality test case set with excellent error correction capabilities.The variability test is a test technique based on defect implantation.It can be used not only as a standard for evaluating test cases,but also to generate a set of high-quality test cases(by killing variants)in the process of generating test cases.However,there are many mutation operators in the existing mutation test technology.Many mutation operators are used to generate the corresponding number of variants exponentially,which leads to expensive test cost and seriously affects the application of this technology to actual test activities.in.Therefore,it is very necessary to reduce the cost of existing mutation tests.By reducing the set of mutation operators without affecting the variance score,it helps to increase the efficiency of generating test cases.This paper studies the new test case generation method based on mutation to generate the optimal set of test cases with short test cases,high test coverage,high mutation score and strong bug detection ability.Firstly,based on the problem of the number of variants,a mutation operator selection strategy based on Selective Mutation is proposed.From the 19 mutation operators of Mujava,a common tool for mutation testing,a subset of mutation operators was selected.The subset contains only five mutation operators(AOIU,AOIS,ROR,AORS,AORB),and the test cases obtained using this subset are able to achieve an average variation score of more than 95% on the variants of the complete set.Therefore,using this subset instead of the full set can greatly reduce the number of variants,thereby reducing the overhead of mutation testing.Then,this paper proposes a test case generation method for mutation test.Based on the genetic algorithm,the crossover operator and insertion,change,and deletion operators of the test case set are redefined.The strategy of reducing the test cases is designed,and finally the test case set with longer length,higher coverage and higher variation score can be obtained..Finally,aiming at the automatic generation and optimization algorithm of test cases based on mutation technology proposed in this paper,a java test case generation tool is designed and implemented,and compared with other existing popular test case automatic generation tools.The research results in this paper enrich the theory and method of mutation test,reduce the variation operator set,reduce the cost of mutation test,and improve the efficiency of test case generation.
Keywords/Search Tags:Test case generation, Mutation test, Mutation operator, Test case optimization
PDF Full Text Request
Related items