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.
翻译:单位测试是软件开发生命周期的一个基本组成部分。 开发者可以通过创建和运行单位测试,轻而易举地捕获和修补源代码中引入的软件错误。 尽管单位测试很重要, 其设计或执行决定有问题, 所谓的测试气味。 这可能从各方面降低软件系统的质量, 使软件系统更难理解, 更复杂地维持, 更容易出现错误和错误。 许多研究讨论了测试气味对测试代码的可能影响。 但是, 缺乏能够捕捉开发者对此类问题的认知的研究。 本研究对开发者如何看待测试代码中测试气味的严重性进行了经验分析。 严格性是指测试气味可能对测试代码产生消极影响的程度。 我们从吉特赫布挑选了6个开放源软件项目, 并采访了他们的开发者, 以了解测试气味是否以及如何影响测试代码。 尽管大多数接受采访的开发者认为测试气味对其代码的强度较低, 测试气味可能会对项目产生消极影响, 特别是在测试代码的维持和演变方面。 此外, 从测试代码中检测和清除测试气味可能对项目产生积极性。