Test Case Generation Based on Mutation Analysis and Set Evolution

Gong-Jie ZHANG,Dun-Wei GONG,Xiang-Juan YAO
DOI: https://doi.org/10.11897/SP.J.1016.2015.02318
2015-01-01
Abstract:Mutation analysis can assist in generating effective test cases.However,the high cost in mutation testing has affected its widespread application in practical software testing.Based on the weak mutation analysis,we proposed a new method to effectively generate test cases with a high ability in detecting defects.In our method,mutant branches are constructed from state-ments before and after mutation,and a new program is formed by integrating all mutant branches into the original program.Then,a novel model is established for optimizing test case generation. In the model,the decision variable is a test suite,and the objective is defined based on the coverage information of the test suite to all mutant branches.Finally,when solving the above model by using the set-based evolutionary optimization method,an appropriate fitness function and genetic operators are designed,so as to generate test cases that kill all mutants by running the method once.The proposed method was applied to thirteen benchmark and industrial programs, and compared with the traditional genetic algorithm.Our experimental results showed that our method can effectively generate test cases,and the generated test cases have a higher ability in detecting defects.
What problem does this paper attempt to address?