paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Evaluating Unit Testing Practices in R Packages

评估 R 包中的单元测试实践
ICSE 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)2021匹配度 1/10 · 该论文是R包单元测试实践的实证研究,关注测试技术债与开发者挑战,与用户的核心方向(静态分析、LLM/Agentic程序、浮点程序分析、贝叶斯程序分析)均无直接关联。引用 17 inbox
Melina Vidoni
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:首次大规模实证分析 R 包单元测试质量、测试技术债来源及开发者面临的挑战。

本文研究 R 包生态中的测试技术债(TTD)问题:由于 R 包被广泛复用,其测试缺陷会沿依赖关系传递,威胁依赖它的分析有效性,但此前缺乏对 R 包单元测试实践的系统认识。作者采用两部分混合方法:首先系统选取并挖掘 177 个开源 R 包,分析测试质量、测试目标并识别潜在 TTD 来源;其次问卷调查 R 包开发者对测试的看法与挑战,回复率为 19.4%。结果表明 R 包测试质量偏低,常见测试坏味包括不充分且晦涩的单元测试、不当断言、缺乏经验的测试者和不当测试设计;即使熟练开发者仍受时间约束、重开发轻测试、工具文档不足和学习曲线陡峭等问题困扰。

问题
R 包生态中测试技术债会通过依赖关系传播,可能威胁所有依赖这些包的分析与脚本的有效性,但此前缺乏对 R 包单元测试实践质量及其成因的系统研究。
方法
采用混合方法:系统挖掘并分析 177 个开源 R 包的测试代码与相关工件,同时对 R 包开发者开展问卷调查(回复率 19.4%)。
评估
通过代码挖掘识别测试质量、测试目标与测试技术债来源,并结合开发者调查分析其对测试的认知与实际挑战;结果显示测试质量普遍较低,常见问题包括不当断言、晦涩单元测试和不当测试设计等。
原文摘要(Abstract)

Testing Technical Debt (TTD) occurs due to shortcuts (non-optimal decisions) taken about testing; it is the test dimension of technical debt. R is a package-based programming ecosystem that provides an easy way to install third-party code, datasets, tests, documentation and examples. This structure makes it especially vulnerable to TTD because errors present in a package can transitively affect all packages and scripts that depend on it. Thus, TTD can effectively become a threat to the validity of all analysis written in R that rely on potentially faulty code. This two-part study provides the first analysis in this area. First, 177 systematically-selected, open-source R packages were mined and analysed to address quality of testing, testing goals, and identify potential TTD sources. Second, a survey addressed how R package developers perceive testing and face its challenges (response rate of 19.4%). Results show that testing in R packages is of low quality; the most common smells are inadequate and obscure unit testing, improper asserts, inexperienced testers and improper test design. Furthermore, skilled R developers still face challenges such as time constraints, emphasis on development rather than testing, poor tool documentation and a steep learning curve.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{Vidoni21,
  title = {Evaluating Unit Testing Practices in R Packages},
  author = {Melina Vidoni},
  booktitle = {ICSE},
  year = {2021},
  doi = {10.1109/icse43902.2021.00136}
}