论文标题

在行业中使用突变测试需要什么 - 在Facebook上进行的研究

What It Would Take to Use Mutation Testing in Industry--A Study at Facebook

论文作者

Beller, Moritz, Wong, Chu-Pan, Bader, Johannes, Scott, Andrew, Machalica, Mateusz, Chandra, Satish, Meijer, Erik

论文摘要

传统上,突变测试产生了一个称为突变体的程序的大量偏差。在工业系统上,Facebook的规模和规模是不可行的。我们不应该创建突变体,即测试套件可能会失败,也不应向开发人员发出可行的信号。为了解决这个问题,在本文中,我们从共同的Java编码错误以及从Facebook上引起操作异常的更改中从半自动学习诱发错误的模式。我们将突变与仪器结合在一起,该突变测量精确访问了突变的代码。结果超过15,000个突变体的结果表明,产生的突变体中有一半以上在Facebook严格的单元,集成和系统测试中幸存下来。此外,在与26名开发人员的案例研究中,除两个外,所有这些都发现了自动检测到的测试孔的信息原则上有趣的。因此,在26个中,几乎一半将通过调整现有或创建新测试来实现向它们提交的突变体作用。其他人的出于多种原因通常没有在突变测试范围之外。这仍然是一个实用的挑战,我们如何包括这样的外部信息来提高突变体的真实可行率。

Traditionally, mutation testing generates an abundance of small deviations of a program, called mutants. At industrial systems the scale and size of Facebook's, doing this is infeasible. We should not create mutants that the test suite would likely fail on or that give no actionable signal to developers. To tackle this problem, in this paper, we semi-automatically learn error-inducing patterns from a corpus of common Java coding errors and from changes that caused operational anomalies at Facebook specifically. We combine the mutations with instrumentation that measures which tests exactly visited the mutated piece of code. Results on more than 15,000 generated mutants show that more than half of the generated mutants survive Facebook's rigorous test suite of unit, integration, and system tests. Moreover, in a case study with 26 developers, all but two found information of automatically detected test holes interesting in principle. As such, almost half of the 26 would actually act on the mutant presented to them by adapting an existing or creating a new test. The others did not for a variety of reasons often outside the scope of mutation testing. It remains a practical challenge how we can include such external information to increase the true actionability rate on mutants.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源