[论文解读] JUGE: An Infrastructure for Benchmarking Java Unit Test Generators
JUGE 是一个标准化的、容器化的基础设施,用于基准测试 Java 单元测试生成器,支持在多种工具和方法间进行可重现的、大规模的评估。它降低了基准测试的工作量,支持结果复现,并通过在超过十个工具的竞赛中统一评估工作流程、代码覆盖率和变异测试指标,促进了学术界与工业界之间的知识转移。
Researchers and practitioners have designed and implemented various automated test case generators to support effective software testing. Such generators exist for various languages (e.g., Java, C#, or Python) and for various platforms (e.g., desktop, web, or mobile applications). Such generators exhibit varying effectiveness and efficiency, depending on the testing goals they aim to satisfy (e.g., unit-testing of libraries vs. system-testing of entire applications) and the underlying techniques they implement. In this context, practitioners need to be able to compare different generators to identify the most suited one for their requirements, while researchers seek to identify future research directions. This can be achieved through the systematic execution of large-scale evaluations of different generators. However, the execution of such empirical evaluations is not trivial and requires a substantial effort to collect benchmarks, setup the evaluation infrastructure, and collect and analyse the results. In this paper, we present our JUnit Generation benchmarking infrastructure (JUGE) supporting generators (e.g., search-based, random-based, symbolic execution, etc.) seeking to automate the production of unit tests for various purposes (e.g., validation, regression testing, fault localization, etc.). The primary goal is to reduce the overall effort, ease the comparison of several generators, and enhance the knowledge transfer between academia and industry by standardizing the evaluation and comparison process. Since 2013, eight editions of a unit testing tool competition, co-located with the Search-Based Software Testing Workshop, have taken place and used and updated JUGE. As a result, an increasing amount of tools (over ten) from both academia and industry have been evaluated on JUGE, matured over the years, and allowed the identification of future research directions.
研究动机与目标
- 降低设计、执行和复现大规模 Java 单元测试生成器实证评估所需的工作量。
- 对不同测试生成工具和技术(例如基于搜索、随机、符号执行)的基准测试流程进行标准化。
- 通过支持结果复现、比较和长期归档,促进学术界与工业界之间的知识转移。
- 支持工业界在采用自动化测试生成工具时做出基于证据的决策。
- 为未来在其他编程语言和应用领域中的评估提供基础。
提出的方法
- JUGE 提供基于 Docker 的容器化执行环境,用于隔离并标准化单元测试生成器的执行。
- 采用插件适配器机制,与多种生成器集成,支持黑盒、白盒和灰盒工具的接入。
- 该基础设施对输入(Java 源码或字节码)、时间预算以及输出分析进行标准化,使用结构化代码覆盖率和变异分数指标。
- 支持并行化处理以实现可扩展性,并支持保存基准、生成的测试用例和中间结果,以实现复现和未来比较。
- 系统设计为可扩展、可配置且可投入生产使用,支持复现包以确保可复现性。
- 自 2013 年以来,通过与 SBST 研讨会联合举办的年度工具竞赛,持续迭代优化。
实验结果
研究问题
- RQ1如何对 Java 单元测试生成器的基准测试进行标准化,以降低工作量并提高可复现性?
- RQ2在不同技术与配置下比较多种单元测试生成工具时,面临哪些关键挑战?
- RQ3共享基础设施在软件测试研究中如何支持长期的实证评估与复现?
- RQ4通用基准测试平台在多大程度上能促进学术界与工业界之间的知识转移?
- RQ5标准化评估对测试生成和工具质量未来研究有何影响?
主要发现
- JUGE 已成功用于在 SBST 工具竞赛的多届活动中评估来自学术界和工业界的十余款单元测试生成工具。
- 该基础设施通过使用结构化覆盖率和变异分数等标准化指标,实现了对生成器的一致、可复现且可扩展的评估。
- 容器化技术与插件适配器机制显著降低了配置开销,并提升了在不同环境间的可移植性。
- 复现包和归档结果的提供增强了实证发现的透明度与可信度,减少了因错误配置导致的结果偏差(例如 EvoSuite 研究中曾出现的问题)。
- JUGE 展现出高度灵活性,支持多种技术(包括基于搜索、随机和符号执行)在多个项目和基准上的应用。
- 该基础设施使研究人员能够以更准确的配置重新审视以往研究,揭示了自动测试中测试异味(test smell)普遍性被高估的问题。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。