arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 1904.04748cs.SE
收藏

论单元测试与代码质量的关系

On the Relation Between Unit Testing and Code Quality

Lucas Gren, Vard Antinyan

摘要:

单元测试被认为是构建高质量软件的关键,因此在实践中得到了广泛的应用。然而,关于单元测试和软件质量方面之间关系的数据仍然很少。为了了解从业者对代码质量的看法和单元测试实践之间的相关性,进行了一项调查研究,其中有来自七个组织的235份调查问卷。此外,我们在其中一个组织中进行了一个案例研究,以调查单元测试覆盖率和单元测试后缺陷之间的相关性。在这两种情况下,没有或弱相关性被发现。我们建议进一步研究不同的测试实践的有效性,以帮助从业者了解如何最好地分配他们的资源到测试链。

英文摘要:

Unit testing has been considered as having a key role in building high quality software, and therefore it has been widely used in practice. However, data on the relationship between unit testing and aspects of software quality remain scarce. A survey study with 235 survey responses from seven organizations was conducted in order to understand the correlation between practitioners' perception of code quality and unit testing practices. In addition, we conducted a case study in one of these organizations to investigate the correlation between unit test coverage and post-unit test defects. In both cases none or weak correlations were found. We recommend further research on the effectiveness of different testing practices in order to help practitioners to understand how to best allocate their resources to the testing chain.

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

↑