arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.11999cs.SE
收藏

WITNESS:一种轻量级且实用的细粒度预测变异测试方法

WITNESS: A lightweight and practical approach to fine-grained predictive mutation testing

State Key Laboratory for Novel Software Technology, Nanjing University(南京大学软件新技术国家重点实验室);University of Luxembourg(卢森堡大学);Huawei Technologies Co., Ltd.(华为技术有限公司)

Zeyu Lu, Peng Zhang, Chun Yong Chong, Shan Gao, Yibiao Yang, Yanhui Li, Lin Chen, Yuming Zhou

AI总结:

针对现有细粒度预测变异测试依赖深度学习导致计算成本高、仅处理方法内部变异体的局限,提出轻量级方法WITNESS,支持方法内外变异体预测,提升效率且性能先进。

摘要:

现有细粒度预测变异测试研究主要依赖深度学习,在实践中面临两大关键局限:(1)过高的计算成本。这些研究采用的深度学习模型需要大量计算资源进行训练和推理加速,导致成本高昂,削弱了预测变异测试降低成本的目标。(2)适用性受限。尽管现代变异测试工具会生成方法内部和外部的变异体,但当前细粒度预测变异测试方法仅处理方法内部的变异体,无法预测方法外部的变异体,限制了其在实际场景中的适用性。我们提出WITNESS,一种新的细粒度预测变异测试方法。WITNESS采用双重设计:(1)收集方法内部和外部变异体的特征,使其适用于所有生成的变异体。(2)不使用计算成本高昂的深度学习,而是采用轻量级经典机器学习模型进行训练和预测,使其更具成本效益,并能直接解释模型背后的决策过程。在Defects4J项目上的评估显示,WITNESS在不同场景下持续达到最先进的预测性能;此外,WITNESS显著提升了杀死矩阵预测的效率;事后分析表明,融合变异前后信息的特征是WITNESS中最重要的特征;基于预测杀死矩阵的测试用例优先级排序结果显示,WITNESS的结果更接近使用实际杀死矩阵的结果,优于基线方法。

英文摘要:

Existing fine-grained predictive mutation testing studies predominantly rely on deep learning, which faces two critical limitations in practice: (1) Exorbitant computational costs. The deep learning models adopted in these studies demand significant computational resources for training and inference acceleration. This introduces high costs and undermines the cost-reduction goal of predictive mutation testing. (2) Constrained applicability. Although modern mutation testing tools generate mutants both inside and outside methods, current fine-grained predictive mutation testing approaches handle only inside-method mutants. As a result, they cannot predict outside-method mutants, limiting their applicability in real-world scenarios. We propose WITNESS, a new fine-grained predictive mutation testing approach. WITNESS adopts a twofold design: (1) With collected features from both inside-method and outside-method mutants, WITNESS is suitable for all generated mutants. (2) Instead of using computationally expensive deep learning, WITNESS employs lightweight classical machine learning models for training and prediction. This makes it more cost-effective and enabling straightforward explanations of the decision-making processes behind the adopted models. Evaluations on Defects4J projects show that WITNESS consistently achieves state-of-the-art predictive performance across different scenarios. Additionally, WITNESS significantly enhances the efficiency of kill matrix prediction. Post-hoc analysis reveals that features incorporating information from before and after the mutation are the most important among those used in WITNESS. Test case prioritization based on the predicted kill matrix shows that WITNESS delivers results much closer to those obtained by using the actual kill matrix, outperforming baseline approaches.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑