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

高质量测试方法的特征:第一次实证研究

Characterizing High-Quality Test Methods: A First Empirical Study

Victor Veloso, Andre Hora

摘要:

为了评估测试套件的质量,可以依赖于突变测试,它计算整个测试用例是否充分地使用了覆盖的行。然而,这种高级别的粒度可能会掩盖单个测试方法的质量。在本文中,我们提出了一个实证研究,以评估质量的测试方法,依靠突变测试的方法级。我们发现高质量和低质量的测试方法在大小、断言数量和修改方面没有重大差异。相比之下,高质量的测试方法受关键测试气味的影响较小。最后,我们讨论了研究人员和从业人员的实际意义。

英文摘要:

To assess the quality of a test suite, one can rely on mutation testing, which computes whether the overall test cases are adequately exercising the covered lines. However, this high level of granularity may overshadow the quality of individual test methods. In this paper, we propose an empirical study to assess the quality of test methods by relying on mutation testing at the method level. We find no major differences between high-quality and low-quality test methods in terms of size, number of asserts, and modifications. In contrast, high-quality test methods are less affected by critical test smells. Finally, we discuss practical implications for researchers and practitioners.

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

↑