论文标题
表征高质量的测试方法:第一项实证研究
Characterizing High-Quality Test Methods: A First Empirical Study
论文作者
论文摘要
为了评估测试套件的质量,可以依靠突变测试,该突变测试计算整个测试用例是否充分行使覆盖线。但是,这种高水平的粒度可能会掩盖单个测试方法的质量。在本文中,我们提出了一项经验研究,以通过依靠方法级别的突变测试来评估测试方法的质量。我们发现高质量和低质量测试方法在大小,断言数量和修改方面没有重大差异。相反,高质量的测试方法受到关键测试气味的影响较小。最后,我们讨论了研究人员和从业人员的实际意义。
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.