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

一个关于使用测试模式的大规模研究,这些测试模式涉及可维护性属性(易于修改、诊断和理解的模式)

A Large-Scale Study on the Usage of Testing Patterns that Address Maintainability Attributes (Patterns for Ease of Modification, Diagnoses, and Comprehension)

Danielle Gonzalez, Joanna C. S. Santos, Andrew Popovich, Mehdi Mirakhorli, Mei Nagappan

摘要:

测试用例的可维护性是一个重要的问题,特别是在开源和分布式开发环境中,项目通常具有不同背景和经验的高贡献者流动率,并且代码所有权经常变化。与设计模式类似,单元测试的模式促进了可维护性质量属性,例如诊断的容易性、可修改性和可理解性。在本文中,我们报告了一个大规模的研究结果的使用四个xUnit测试模式,可用于满足这些可维护性属性。这是一项首创的研究,它开发了自动化技术来调查82,447个开源项目中的这些问题,研究结果为开源项目中的测试实践提供了更多的见解。我们的研究结果表明,只有17%的项目有测试用例,在我们研究的251个测试框架中,有93个被使用。我们发现,24%的测试文件项目实现了有助于可维护性的模式,而其余的项目没有使用这些模式。多个定性分析表明,模式的使用是个别开发人员的临时决定,而不是由项目的特点,开发人员有时使用替代技术来解决可维护性问题。

英文摘要:

Test case maintainability is an important concern, especially in open source and distributed development environments where projects typically have high contributor turnover with varying backgrounds and experience, and where code ownership changes often. Similar to design patterns, patterns for unit testing promote maintainability quality attributes such as ease of diagnoses, modifiability, and comprehension. In this paper, we report the results of a large-scale study on the usage of four xUnit testing patterns which can be used to satisfy these maintainability attributes. This is a first-of-its-kind study which developed automated techniques to investigate these issues across 82,447 open source projects, and the findings provide more insight into testing practices in open source projects. Our results indicate that only 17% of projects had test cases, and from the 251 testing frameworks we studied, 93 of them were being used. We found 24% of projects with test files implemented patterns that could help with maintainability, while the remaining did not use these patterns. Multiple qualitative analyses indicate that usage of patterns was an ad-hoc decision by individual developers, rather than motivated by the characteristics of the project, and that developers sometimes used alternative techniques to address maintainability concerns.

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

↑