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

极端突变测试在实践中的应用:一个工业案例研究

Extreme mutation testing in practice: An industrial case study

Maik Betka, Stefan Wagner

摘要:

变异测试用于评估测试集的有效性。近年来,出现了一种称为极端突变测试的有前途的变化,这种变化在计算上更便宜。它标识了可以完全删除其功能的方法,并且测试套件不会注意到它,尽管有覆盖率。这些方法被称为伪测试。在本文中,我们比较了传统和极端突变测试的执行和分析时间,并讨论了它们在实践中的意义。我们将研究极端突变测试如何影响当前的软件开发实践,并讨论需要解决的开放性挑战,以促进行业采用。为此,我们进行了一个工业案例研究,包括在半导体行业的一个大型软件项目中运行传统和极端突变测试,该项目由超过11,000个单元测试的测试套件覆盖。除此之外,我们还对25个伪测试方法进行了定性分析,并采访了两个有经验的开发人员,看看他们是如何编写单元测试的,并收集了关于极端突变测试结果的有用性的意见。我们的结果包括执行时间,分数,执行的测试和mutator的数量,为什么方法是伪测试的原因,以及采访摘要。我们的结论是,较短的执行和分析时间是很明显的,在实践中,极端的突变测试补充编写单元测试与代码覆盖工具。我们建议,伪测试的代码应突出显示在代码覆盖率报告,极端的突变测试应在编写单元测试,而不是在一个解耦的会话。未来的研究应该研究如何在编写单元测试时执行极端突变测试,以便结果足够快但仍然有意义。

英文摘要:

Mutation testing is used to evaluate the effectiveness of test suites. In recent years, a promising variation called extreme mutation testing emerged that is computationally less expensive. It identifies methods where their functionality can be entirely removed, and the test suite would not notice it, despite having coverage. These methods are called pseudo-tested. In this paper, we compare the execution and analysis times for traditional and extreme mutation testing and discuss what they mean in practice. We look at how extreme mutation testing impacts current software development practices and discuss open challenges that need to be addressed to foster industry adoption. For that, we conducted an industrial case study consisting of running traditional and extreme mutation testing in a large software project from the semiconductor industry that is covered by a test suite of more than 11,000 unit tests. In addition to that, we did a qualitative analysis of 25 pseudo-tested methods and interviewed two experienced developers to see how they write unit tests and gathered opinions on how useful the findings of extreme mutation testing are. Our results include execution times, scores, numbers of executed tests and mutators, reasons why methods are pseudo-tested, and an interview summary. We conclude that the shorter execution and analysis times are well noticeable in practice and show that extreme mutation testing supplements writing unit tests in conjunction with code coverage tools. We propose that pseudo-tested code should be highlighted in code coverage reports and that extreme mutation testing should be performed when writing unit tests rather than in a decoupled session. Future research should investigate how to perform extreme mutation testing while writing unit tests such that the results are available fast enough but still meaningful.

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

↑