Evaluating Unit Testing Practices in R Packages
Melina C. Vidoni
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 3225332f-a6c3-47fb-bb24-2323b8549e5aRelated papers
- 23 shades of self-admitted technical debt: an empirical study on machine learning softwareDavid O'Brien, Sumon Biswas, Sayem Imtiaz, Rabe Abdalkareem et al.FSE 2022 · 37 citations
- Paired Code Smells and Test Smells: A Fine-Grained Longitudinal Empirical StudyZiwen CaiISSTA 2026
- How disabled tests manifest in test maintainability challenges?Dong Jae Kim, Bo Yang, Jinqiu Yang, Tse-Hsun (Peter) ChenFSE 2021 · 9 citations
- Detecting and Explaining Self-Admitted Technical Debts with Attention-based Neural NetworksXin Wang, Jin Liu, Li Li, Xiao Chen et al.ASE 2020 · 25 citations
- An Empirical Study of Refactorings and Technical Debt in Machine Learning SystemsYiming Tang, Raffi Khatchadourian, Mehdi Bagherzadeh, Rhia Singh et al.ICSE 2021 · 60 citations
