Skip to main content
QUICK REVIEW

[论文解读] What Do Contribution Guidelines Say About Software Testing?

Bruna Falcucci, Felipe Gomide|arXiv (Cornell University)|Feb 3, 2026
Software Engineering Research被引用 0
一句话总结

对200个Python和JavaScript项目的实证研究显示,78%提供了供贡献者使用的测试文档,主要在CONTRIBUTING等文件中,详细说明如何运行测试和单元测试类型,对编写测试、集成/端到端测试、覆盖率和模拟的关注较少。

ABSTRACT

Software testing plays a crucial role in the contribution process of open-source projects. For example, contributions introducing new features are expected to include tests, and contributions with tests are more likely to be accepted. Although most real-world projects require contributors to write tests, the specific testing practices communicated to contributors remain unclear. In this paper, we present an empirical study to understand better how software testing is approached in contribution guidelines. We analyze the guidelines of 200 Python and JavaScript open-source software projects. We find that 78\% of the projects include some form of test documentation for contributors. Test documentation is located in multiple sources, including exttt{CONTRIBUTING} files (58\%), external documentation (24\%), and exttt{README} files (8\%). Furthermore, test documentation commonly explains how to run tests (83.5\%), but less often provides guidance on how to write tests (37\%). It frequently covers unit tests (71\%), but rarely addresses integration (20.5\%) and end-to-end tests (15.5\%). Other key testing aspects are also less frequently discussed: test coverage (25.5\%) and mocking (9.5\%). We conclude by discussing implications and future research.

研究动机与目标

  • 评估在真实世界指南中向贡献者提供的与测试相关信息的频率。
  • 识别贡献者指南中覆盖的测试主题及哪些主题被忽略。
  • 推断对项目维护者和研究人员在改进测试文档方面的实际意义。

提出的方法

  • 在GitHub按星标数选择前100个Python项目和前100个JavaScript项目。
  • 在README/CONTRIBUTING/外部文档中识别贡献指南,包括非标准位置。
  • 检测贡献者测试文档的存在与位置。
  • 将内容分类为运行/编写测试、测试类型、测试覆盖、模拟和最佳实践。
  • 量化各内容类别在项目中的出现频率。

实验结果

研究问题

  • RQ1RQ1:在被分析的项目中,贡献者测试文档的存在频率如何?
  • RQ2RQ2:贡献者测试文档的内容是什么,哪些主题被强调或被忽视?

主要发现

  • 分析的项目中有78%包含某种形式的供贡献者使用的测试文档。
  • 测试文档主要位于CONTRIBUTING文件(58%)和外部文档(24%),README文件占8%。
  • 大多数内容解释如何运行测试(83.5%),但关于如何编写测试的指导较少(37%)。
  • 单元测试是最具代表性的测试类型(71%),而集成测试(20.5%)和端到端测试(15.5%)较少被覆盖。
  • 测试覆盖率(25.5%)、模拟(9.5%)和最佳实践(9%)相对不足。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。