Feasible Path Generation of Weak Mutation Testing Based on Statistical Analysis

Xiang-Ying DANG,Dun-Wei GONG,Xiang-Juan YAO
DOI: https://doi.org/10.11897/SP.J.1016.2016.02355
2016-01-01
Chinese Journal of Computers
Abstract:Mutation testing is a fault-based testing technique.The high cost,however,limits its widespread applications in practical testing.Papadakis et al.transformed the problem of weak mutation testing of a program into that of covering the true branches of mutant statements of another program,with the purpose of generating mutation test data by using previous methods of branch coverage.The converted program contains,however,a great number of mutant branches by using the above approach,thus having a difficulty in generating test data that cover these branches.If appropriate methods are employed to reduce the mutant branches in the converted <br> program,and the reduced mutant branches are grouped according to the paths to which they belong,mutation test data with high quality will be generated by using previous methods of path coverage,hence improving the efficiency of weak mutation testing.Effective methods for generating feasible paths based on a program and its mutants are,however,of absence up to date.In view of this,this paper proposes an approach to generate feasible paths for weak mutation testing by considering the correlation of the true branches of mutant statements,with the purpose of killing all mutants by test data that cover all these feasible paths.To fulfill this task,the dominance relation of the true branches of mutant statements is first determined and employed to reduce the dominated true branches.Following that the non-dominated branches of mutant statements are instrumented into the program to form another program.The true branches of mutant statements that are generated by mutating the same statement are transformed into a new one based on their correlation.Then feasible sub-paths that contain these new branches and the original statement are produced based on the correlation among the original statement and the new branches.Finally, a correlation matrix is generated and reduced based on the execution of these sub-paths using statistical analysis,and one or more feasible paths that contain all these feasible sub-paths are obtained based the correlation matrix.The proposed method is applied to nine benchmarks or industrial programs,and compared with traditional algorithms.Our experimental results demon-strate that the proposed method can generate a small number of paths which cover all the mutant branches,with less time in executing the program.In addition,the sampling size involved in the proposed method has an influence on the number of feasible paths to some degree,whereas slightly impacts time in executing the program.
What problem does this paper attempt to address?