Spectral clustering based mutant reduction for mutation testing

Abstract Context: Mutation testing techniques, which attempt to construct a set of so-called mutants by seeding various faults into the software under test, have been widely used to generate test cases as well as to evaluate the effectiveness of a test suite. Its popularity in practice is significantly hindered by its high cost, majorly caused by the large number of mutants generated by the technique. Objective: It is always a challenging task to reduce the number of mutants while preserving the effectiveness of mutation testing. In this paper, we make use of an intelligent technique, namely spectral clustering, to improve the efficacy of mutant reduction. Method: First of all, we give a family of definitions and the method to calculate the distance between mutants according to the weak mutation testing criteria. Then we propose a mutant reduction method based on spectral clustering (SCMT), including the determination method of the number of clusters, spectral clustering of mutants, and selection of representative mutants. Results: The experimental studies based on 12 object programs show that the new approach can significantly reduce the number of mutants without jeopardizing the performance of mutation testing. As compared with other benchmark techniques, the new approach based on weak mutation testing criteria cannot only consistently deliver high effectiveness of mutation testing, but also help significantly reduce the time-cost of mutation testing. Conclusion: It is clearly demonstrated that the use of spectral clustering can help enhance the cost-effectiveness of mutation testing. The research reveals some potential research directions for not only mutation testing but also the broad area of software testing.

[1]  W. Eric Wong,et al.  Reducing the cost of mutation testing: An empirical study , 1995, J. Syst. Softw..

[2]  Mario Piattini,et al.  Decreasing the cost of mutation testing with second‐order mutants , 2009, Softw. Test. Verification Reliab..

[3]  Michael D. Ernst,et al.  Randoop: feedback-directed random testing for Java , 2007, OOPSLA '07.

[4]  Mario Piattini,et al.  Mutation Testing , 2014, IEEE Software.

[5]  M. Fiedler Algebraic connectivity of graphs , 1973 .

[6]  Li Ming,et al.  Software Defect Prediction: Software Defect Prediction , 2008 .

[7]  Richard J. Lipton,et al.  Hints on Test Data Selection: Help for the Practicing Programmer , 1978, Computer.

[8]  Mike Papadakis,et al.  Automatically performing weak mutation with the aid of symbolic execution, concolic testing and search-based testing , 2011, Software Quality Journal.

[9]  Anil K. Jain,et al.  Data clustering: a review , 1999, CSUR.

[10]  Huai Liu,et al.  A path-aware approach to mutant reduction in mutation testing , 2017, Inf. Softw. Technol..

[11]  Auri Marcelo Rizzo Vincenzi,et al.  Unit and integration testing strategies for C programs using mutation , 2001, Softw. Test. Verification Reliab..

[12]  Laurie A. Williams,et al.  On guiding the augmentation of an automated test suite via mutation analysis , 2009, Empirical Software Engineering.

[13]  Michael D. Ernst,et al.  Eclat: Automatic Generation and Classification of Test Inputs , 2005, ECOOP.

[14]  Yves Le Traon,et al.  Model-Based Testing of Obligations , 2014, 2014 14th International Conference on Quality Software.

[15]  John A. Clark,et al.  Subdomain-based test data generation , 2015, J. Syst. Softw..

[16]  A. Jefferson Offutt,et al.  Constraint-Based Automatic Test Data Generation , 1991, IEEE Trans. Software Eng..

[17]  Yves Le Traon,et al.  Threats to the validity of mutation-based test assessment , 2016, ISSTA.

[18]  Sang-Woon Kim,et al.  Mutation testing cost reduction by clustering overlapped mutants , 2016, J. Syst. Softw..

[19]  Jitendra Malik,et al.  Contour and Texture Analysis for Image Segmentation , 2001, International Journal of Computer Vision.

[20]  K. N. King,et al.  A fortran language system for mutation‐based software testing , 1991, Softw. Pract. Exp..

[21]  Jitendra Malik,et al.  Normalized Cuts and Image Segmentation , 2000, IEEE Trans. Pattern Anal. Mach. Intell..

[22]  Mark Harman,et al.  Search Algorithms for Regression Test Case Prioritization , 2007, IEEE Transactions on Software Engineering.

[23]  Chen Xiang Mutation Testing: Principal, Optimization and Application , 2012 .

[24]  Koushik Sen,et al.  Selecting fault revealing mutants , 2018, Empirical Software Engineering.

[25]  Pan Neng-gang Mutants reduction based on genetic algorithm for clustering , 2011 .

[26]  A. Jefferson Offutt,et al.  Mutation analysis using mutant schemata , 1993, ISSTA '93.

[27]  Michael I. Jordan,et al.  On Spectral Clustering: Analysis and an algorithm , 2001, NIPS.

[28]  Richard M. Leahy,et al.  An Optimal Graph Theoretic Approach to Data Clustering: Theory and Its Application to Image Segmentation , 1993, IEEE Trans. Pattern Anal. Mach. Intell..

[29]  Nina Yevtushenko,et al.  Source Code Optimization using Equivalent Mutants , 2018, Inf. Softw. Technol..

[30]  Timothy Alan Budd,et al.  Mutation analysis of program test data , 1980 .

[31]  Tao Xie,et al.  Is operator-based mutant selection superior to random mutant selection? , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[32]  Lionel C. Briand,et al.  Is mutation an appropriate tool for testing experiments? , 2005, ICSE.

[33]  Ulrike von Luxburg,et al.  A tutorial on spectral clustering , 2007, Stat. Comput..

[34]  A. Jefferson Offutt,et al.  Mutation 2000: uniting the orthogonal , 2001 .

[35]  Mark Harman,et al.  Constructing Subtle Faults Using Higher Order Mutation Testing , 2008, 2008 Eighth IEEE International Working Conference on Source Code Analysis and Manipulation.

[36]  Sun Chang-si A Spectral Clustering with Ascertainable Clustering Number , 2010 .

[37]  Minjie Guo,et al.  A New Hybrid Clustering Algorithm Based on Stimulated Annealing , 2013, 2013 5th International Conference on Intelligent Human-Machine Systems and Cybernetics.

[38]  A. Jefferson Offutt,et al.  An Empirical Evaluation of Weak Mutation , 1994, IEEE Trans. Software Eng..

[39]  Gregg Rothermel,et al.  An experimental evaluation of selective mutation , 1993, Proceedings of 1993 15th International Conference on Software Engineering.

[40]  A. Jefferson Offutt,et al.  MuJava: an automated class mutation system , 2005, Softw. Test. Verification Reliab..

[41]  Yair Weiss,et al.  Segmentation using eigenvectors: a unifying view , 1999, Proceedings of the Seventh IEEE International Conference on Computer Vision.

[42]  Fanlin Meng,et al.  Mutant reduction based on dominance relation for weak mutation testing , 2017, Inf. Softw. Technol..

[43]  Bernhard K. Aichernig,et al.  Killing strategies for model‐based mutation testing , 2015, Softw. Test. Verification Reliab..

[44]  Baowen Xu,et al.  A Novel Method of Mutation Clustering Based on Domain Analysis , 2009, SEKE.

[45]  Joanna Strug,et al.  Using Structural Similarity to Classify Tests in Mutation Testing , 2013 .

[46]  A. Jefferson Offutt,et al.  How strong is weak mutation? , 1991, TAV4.

[47]  He Li,et al.  Test-Data Generation Guided by Static Defect Detection , 2009, Journal of Computer Science and Technology.

[48]  Akbar Siami Namin,et al.  Sufficient mutation operators for measuring test effectiveness , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[49]  L. Darrell Whitley,et al.  Subtle higher order mutants , 2017, Inf. Softw. Technol..

[50]  Jacob A. Abraham,et al.  FERRARI: A Flexible Software-Based Fault and Error Injection System , 1995, IEEE Trans. Computers.

[51]  Chen Jin Research on Software Fault Injection Testing , 2009 .

[52]  Hong Yu,et al.  Local density adaptive similarity measurement for spectral clustering , 2011, Pattern Recognit. Lett..

[53]  Lu Yansheng,et al.  Research on Software Fault Injection Testing , 2009 .

[54]  W. Eric Wong,et al.  An empirical comparison of data flow and mutation‐based test adequacy criteria , 1994, Softw. Test. Verification Reliab..

[55]  Andreas Zeller,et al.  Mutation-Driven Generation of Unit Tests and Oracles , 2012, IEEE Trans. Software Eng..

[56]  Richard G. Hamlet,et al.  Testing Programs with the Aid of a Compiler , 1977, IEEE Transactions on Software Engineering.

[57]  Mark Harman,et al.  Higher Order Mutation Testing , 2009, Inf. Softw. Technol..

[58]  Mike Papadakis,et al.  Mutation based test case generation via a path selection strategy , 2012, Inf. Softw. Technol..