paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Tests from traces: automated unit test extraction for R

从执行轨迹中生成测试:面向 R 的自动化单元测试抽取
ISSTA Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis2018匹配度 2/10 · 该论文研究从执行轨迹自动抽取 R 单元测试,属于软件测试与动态分析方向,与用户关注的静态分析、LLM/Agent 改进程序分析、浮点程序分析及贝叶斯程序分析等核心问题关联很弱。虽然涉及程序分析与工程工具,但并非用户研究画像中的主要方向。引用 19 inbox
Filip Křikava, Jan Vitek
crossref: 2026-09-12

AI 速览

一句话:提出 Genthat,从 R 程序执行轨迹非侵入式抽取单元测试,降低测试编写成本并提升覆盖率。

单元测试编写与维护成本高。本文研究从客户端代码执行轨迹中为软件包抽取单元测试的可行性,目标是在减少测试数量和体积的同时提高覆盖率。R 语言具有极端动态性、强制类型转换且缺乏类型系统,使传统测试抽取技术效果受限。作者提出非侵入式工具 Genthat,记录 R 程序执行轨迹并从中抽取单元测试。在 1,545 个包、约 170 万行 R 代码上评估:抽取测试将覆盖率从 267,496 行提升到 700,918 行,且生成测试运行时间比原始代码快 1.9 倍。

问题
单元测试编写与维护成本高;论文考察能否从客户端代码执行轨迹中抽取目标包的单元测试,并减少测试数量/体积、提升覆盖率。
方法
提出 Genthat,非侵入式记录 R 程序执行轨迹并从中抽取单元测试,以应对 R 的动态性、强制转换和缺乏类型。
评估
在 1,545 个包、约 170 万行 R 代码上评估,覆盖率从 267,496 行提升至 700,918 行,生成测试运行时间比原始代码快 1.9 倍。
原文摘要(Abstract)

Unit tests are labor-intensive to write and maintain. This paper looks into how well unit tests for a target software package can be extracted from the execution traces of client code. Our objective is to reduce the effort involved in creating test suites while minimizing the number and size of individual tests, and maximizing coverage. To evaluate the viability of our approach, we select a challenging target for automated test extraction, namely R, a programming language that is popular for data science applications. The challenges presented by R are its extreme dynamism, coerciveness, and lack of types. This combination decrease the efficacy of traditional test extraction techniques. We present Genthat, a tool developed over the last couple of years to non-invasively record execution traces of R programs and extract unit tests from those traces. We have carried out an evaluation on 1,545 packages comprising 1.7M lines of R code. The tests extracted by Genthat improved code coverage from the original rather low value of 267,496 lines to 700,918 lines. The running time of the generated tests is 1.9 times faster than the code they came from

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot4804,
  title = {Tests from traces: automated unit test extraction for R},
  author = {Filip Křikava and Jan Vitek},
  booktitle = {ISSTA},
  year = {2018},
  doi = {10.1145/3213846.3213863}
}