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

单元测试文件中“简单愚蠢错误”分布的探索性研究

On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Exploratory Study

Anthony Peruma, Christian D. Newman

摘要:

保证软件系统质量的一个关键方面是单元测试的实践。通过单元测试,开发人员验证产品源代码的正确性,从而验证系统在测试中的预期行为。然而,单元测试代码容易出现问题,从代码中的错误到糟糕的测试用例设计(即,测试气味)。在这项研究中,我们比较和对比了一种被称为“简单愚蠢错误”(SStuBs)的单语句错误修复在测试和非测试(即,生产)文件。我们的研究结果表明,SStuB更频繁地出现在非测试文件比在测试文件中,与大多数修复相关的代码与断言语句在测试文件中。此外,大多数显示SStuB的测试文件也显示测试气味。我们设想我们的研究结果使工具供应商能够更好地支持开发人员改善测试套件的维护。

英文摘要:

A key aspect of ensuring the quality of a software system is the practice of unit testing. Through unit tests, developers verify the correctness of production source code, thereby verifying the system's intended behavior under test. However, unit test code is subject to issues, ranging from bugs in the code to poor test case design (i.e., test smells). In this study, we compare and contrast the occurrences of a type of single-statement-bug-fix known as "simple stupid bugs" (SStuBs) in test and non-test (i.e., production) files in popular open-source Java Maven projects. Our results show that SStuBs occur more frequently in non-test files than in test files, with most fix-related code associated with assertion statements in test files. Further, most test files exhibiting SStuBs also exhibit test smells. We envision our findings enabling tool vendors to better support developers in improving the maintenance of test suites.

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

↑