Comparison Research on Rule-based and Learning-based Mutation Techniques

被引:0
|
作者
Gong Z.-H. [1 ,2 ]
Chen Y.-Z. [1 ,2 ]
Chen J.-J. [3 ]
Hao D. [1 ,2 ]
机构
[1] Key Laboratory of High Confidence Software Technologies, Peking University, Ministry of Education, Beijing
[2] School of Computer Science, Peking University, Beijing
[3] College of Intelligence and Computing, Tianjin University, Tianjin
来源
Ruan Jian Xue Bao/Journal of Software | 2024年 / 35卷 / 07期
关键词
defect detection; empirical study; mutation analysis; mutation testing;
D O I
10.13328/j.cnki.jos.007113
中图分类号
学科分类号
摘要
Mutation testing is an effective software testing technique. It helps improve the defect detection capability of an existing test suite by generating mutants that simulate software defects. The quality of mutants has a significant impact on the effectiveness of mutation testing. The traditional mutation testing approach typically employs manually designed syntactic rule-based mutation operators to generate mutants, and has achieved some academic success. In recent years, many studies have started to incorporate deep learning techniques to generate mutants by learning historical code from open source projects. This new approach has achieved preliminary progress in mutant generation. A comprehensive comparison of the two mutation techniques, i.e. rule-based and learning-based, which have different mechanisms but both aim to improve the defect detection capability of the test suite by mutation, is crucial for mutation testing and its downstream tasks. To handle the problem, this study designs and implements an empirical study of rule-based and learning-based mutation techniques, aiming to understand the performance of mutation techniques with different mechanisms on the task of mutation testing, as well as the variability of the generated mutants in terms of program semantics. Specifically, this study uses the Defect4J v1.2.0 dataset to compare the syntactic rule-based mutation techniques represented by MAJOR and PIT with the deep learning-based mutation techniques represented by DeepMutation, μBERT, and LEAM. The experimental results show that both rule-based and learning-based mutation techniques can effectively support mutation testing practices, but MAJOR has the best testing performance and is able to detect 85.4% of real defects. In terms of semantic representation, MAJOR has the strongest semantic representation capability, and its constructed test suite is able to kill more than 95% of the mutants generated by other mutation techniques. In terms of defect representation, both types of techniques are unique. © 2024 Chinese Academy of Sciences. All rights reserved.
引用
收藏
页码:3093 / 3114
页数:21
相关论文
共 51 条
  • [1] Ammann P, Offutt J., Introduction to Software Testing, (2016)
  • [2] Moore I., Jester-a JUnit test tester, Proc. of the 2nd XP, pp. 84-87, (2001)
  • [3] Ma YS, Offutt J, Kwon YR., MuJava: An automated class mutation system, Software Testing, Verification and Reliability, 15, 2, (2005)
  • [4] Irvine SA, Pavlinic T, Trigg L, Et al., Jumble Java byte code to measure the effectiveness of unit tests, Proc. of the Testing: Academic and Industrial Conf. on Practice and Research Techniques-MUTATION (TAICPART-MUTATION 2007), pp. 169-175, (2007)
  • [5] Schuler D, Zeller A., Javalanche: Efficient mutation testing for Java, Proc. of the 7th Joint Meeting of the European Software Engineering Conf. and the ACM SIGSOFT Symp. on The Foundations of Software Engineering, pp. 297-298, (2009)
  • [6] Just R., The major mutation framework: Efficient and scalable mutation analysis for Java, Proc. of the 2014 Int’l Symp. on Software Testing and Analysis, pp. 433-436, (2014)
  • [7] Coles H, Laurent T, Henard C, Et al., PIT: A practical mutation testing tool for Java, Proc. of the 25th Int’l Symp. on Software Testing and Analysis, pp. 449-452, (2016)
  • [8] Papadakis M, Kintis M, Zhang J, Et al., Mutation testing advances: An analysis and survey, Advances in Computers, 112, pp. 275-378, (2019)
  • [9] Papadakis M, Le Traon Y., Metallaxis-FL: Mutation-based fault localization, Software Testing, Verification and Reliability, 25, 5‒7, (2015)
  • [10] Zhang J, Wang Z, Zhang L, Et al., Predictive mutation testing, Proc. of the 25th Int’l Symp. on Software Testing and Analysis, pp. 342-353, (2016)