paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Does Mutation Testing Improve Testing Practices?

变异测试能改进测试实践吗?
ICSE 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)2021匹配度 3/10 · 论文是变异测试的实证软件工程研究,关注测试质量与实践影响,与用户核心方向(静态分析、LLM/Agent 与程序分析交叉、浮点程序分析、贝叶斯程序分析)没有直接关系,仅在程序分析与测试质量层面有边缘关联。引用 73 inbox
Goran Petrović, Marko Ivanković, Gordon Fraser, René Just
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:基于近1500万变异体,实证表明变异测试促使开发者补充高质量测试,并与真实故障相关。

变异测试被视为代码覆盖率的替代指标,但缺少证据表明为变异体编写测试能提升测试质量。本文分析近1500万个变异体数据,考察变异体随时间对开发者行为的影响,并关联历史高优先级真实故障修复。结果显示,使用变异测试的开发者会编写更多测试,并主动用高质量测试改进测试套件,使存活变异体减少;同时,变异体与真实故障存在耦合,若在引入故障的变更上使用变异测试,本可报告存活的变异体并预防该缺陷。

问题
变异测试虽能提示测试套件漏洞,但实践中缺乏证据说明为变异体编写测试是否真正提升测试质量。
方法
分析近1500万个变异体的大规模数据,追踪变异体对开发者长期行为的影响,并与历史高优先级真实故障修复进行关联分析。
评估
通过开发者测试编写与测试套件改进的观测,以及变异体与真实故障的耦合分析,表明变异测试能带来更高质量测试并可能预防缺陷。
原文摘要(Abstract)

Various proxy metrics for test quality have been defined in order to guide developers when writing tests. Code coverage is particularly well established in practice, even though the question of how coverage relates to test quality is a matter of ongoing debate. Mutation testing offers a promising alternative: Artificial defects can identify holes in a test suite, and thus provide concrete suggestions for additional tests. Despite the obvious advantages of mutation testing, it is not yet well established in practice. Until recently, mutation testing tools and techniques simply did not scale to complex systems. Although they now do scale, a remaining obstacle is lack of evidence that writing tests for mutants actually improves test quality. In this paper we aim to fill this gap: By analyzing a large dataset of almost 15 million mutants, we investigate how these mutants influenced developers over time, and how these mutants relate to real faults. Our analyses suggest that developers using mutation testing write more tests, and actively improve their test suites with high quality tests such that fewer mutants remain. By analyzing a dataset of past fixes of real high-priority faults, our analyses further provide evidence that mutants are indeed coupled with real faults. In other words, had mutation testing been used for the changes introducing the faults, it would have reported a live mutant that could have prevented the bug.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{PetrovicIFJ21,
  title = {Does Mutation Testing Improve Testing Practices?},
  author = {Goran Petrović and Marko Ivanković and Gordon Fraser and René Just},
  booktitle = {ICSE},
  year = {2021},
  doi = {10.1109/icse43902.2021.00087}
}