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

开发人员对测试气味严重程度的感知:一项实证研究

Developers perception on the severity of test smells: an empirical study

Denivan Campos, Larissa Rocha, Ivan Machado

摘要:

单元测试是软件开发生命周期的重要组成部分。通过创建和运行单元测试,开发人员可以轻松快速地捕获和修复源代码中引入的软件错误。尽管单元测试很重要,但它会受到糟糕的设计或实现决策的影响,即所谓的测试气味。这些可能会从各个方面降低软件系统的质量,使其更难理解,更复杂的维护,更容易出现错误和bug。许多研究讨论了测试气味对测试代码的可能影响。然而,缺乏研究,捕捉开发人员对这些问题的看法。本研究实证分析了开发人员如何在他们开发的测试代码中感知测试气味的严重性。严重性是指测试气味可能对测试代码产生负面影响的程度。我们从GitHub中选择了六个开源软件项目,并采访了他们的开发人员,以了解测试气味是否以及如何影响测试代码。尽管大多数受访的开发人员认为测试气味对他们的代码的严重性很低,但他们表示测试气味可能会对项目产生负面影响,特别是在测试代码的可维护性和演化方面。此外,从测试代码中检测和移除测试气味可能对项目有积极意义。

英文摘要:

Unit testing is an essential component of the software development life-cycle. A developer could easily and quickly catch and fix software faults introduced in the source code by creating and running unit tests. Despite their importance, unit tests are subject to bad design or implementation decisions, the so-called test smells. These might decrease software systems quality from various aspects, making it harder to understand, more complex to maintain, and more prone to errors and bugs. Many studies discuss the likely effects of test smells on test code. However, there is a lack of studies that capture developers perceptions of such issues. This study empirically analyzes how developers perceive the severity of test smells in the test code they develop. Severity refers to the degree to how a test smell may negatively impact the test code. We selected six open-source software projects from GitHub and interviewed their developers to understand whether and how the test smells affected the test code. Although most of the interviewed developers considered the test smells as having a low severity to their code, they indicated that test smells might negatively impact the project, particularly in test code maintainability and evolution. Also, detecting and removing test smells from the test code may be positive for the project.

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

↑