paperbot · PL 论文追踪

全部论文 待读 收藏

EvoLLM: High-Coverage, Readable, and Token-Efficient Unit Test Generation for Industrial Java Codebases

EvoLLM:面向工业级 Java 代码库的高覆盖率、可读且令牌高效的单元测试生成
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026引用 0 inbox
Seokhyeon Moon, Myungho Lee, Jihun Kim, Yoon-Chan Jhi, Jihoon Cho, Hakjoo Oh
crossref: 2026-10-09

AI 速览

一句话:将 EvoSuite 加固与按簇 LLM 重构相结合,在提升覆盖率的同时大幅降低 token 消耗并改善可读性。

在工业环境中采用自动 Java 单元测试生成,需要同时满足高覆盖率、可读性、token 效率以及对现代 Java 的可部署性,而已有技术无法四者兼顾:基于搜索的生成器在可读性和新版本 Java 支持上表现不佳,以 LLM 为中心的生成器需消耗数千万 token,先前的 LLM 测试重构方法在受控实验中会使基线覆盖率下降 8–21 个百分点。为此,作者提出并部署了混合式生成器 EvoLLM:一方面使用 EvoSuiteNG,即通过失败分析驱动的 EvoSuite 加固版本,解决可部署性问题并强化基线覆盖率;另一方面进行按簇的 LLM 重构,将测试按覆盖率目标分组,并在单次 LLM 调用中基于紧凑的待测程序上下文重写整个簇。在 6 个开源项目和 3 个工业项目上,EvoLLM 优于 6 个最先进基线,行覆盖率提升 8.2–20.7 个百分点,分支覆盖率提升 6.2–19.4 个百分点,变异得分提升 6.8–24.5 个百分点,同时 LLM token 用量减少 47.3%–93.0%。其测试生成阶段在 JDK 8、11 和 17 构建的项目上均展现出稳健的可部署性,并在需要 JDK 17 的 Spring-core 版本上效果显著;14 名开发者参与的调研进一步表明,EvoLLM 生成的测试在可读性上优于先前工具与开发者手写的测试。

问题
工业界采用自动 Java 单元测试生成要求同时具备高覆盖率、可读性、token 效率与现代 Java(JDK 8/11/17)可部署性,但现有搜索式与 LLM 式方法均无法同时满足这四项要求。
方法
EvoLLM 将失败分析驱动的 EvoSuite 加固版本 EvoSuiteNG 与按覆盖率目标分簇的 LLM 重构相结合:先把测试按覆盖率目标聚类,再在单次 LLM 调用中基于紧凑的待测程序上下文重写每个簇。
评估
在 6 个开源项目和 3 个工业项目(含需 JDK 17 的 Spring-core 版本)上与 6 个最先进基线对比行/分支覆盖率和变异得分,并统计 LLM token 消耗与在 JDK 8、11、17 上的可部署性;另以 14 名开发者的调研评估可读性。
原文摘要(Abstract)

Adopting automated Java unit-test generation in industrial settings requires high coverage, readability, token efficiency, and modern-Java deployability. No existing technique meets all four: search-based test generators struggle with readability and modern-Java deployability, LLM-centric generators consume tens of millions of tokens, and prior LLM-based test refactoring methods drop baseline coverage by 8–21 percentage points (pp) in our controlled setups. We report on EvoLLM, a hybrid Java unit-test generator we built and deployed to address all four requirements. EvoLLM combines EvoSuiteng—a failure-analysis-driven hardening of EvoSuite that resolves deployability issues and strengthens baseline coverage—with cluster-wise LLM-based refactoring that groups tests by coverage goals and rewrites each cluster in a single LLM call grounded in compact program-under-test context. Across six open-source and three industrial projects, EvoLLM outperforms six state-of-the-art baselines, improving line coverage by 8.2–20.7 pp, branch coverage by 6.2–19.4 pp, and mutation score by 6.8–24.5 pp, while reducing LLM token usage by 47.3%–93.0%. In addition, the test generation stage of EvoLLM demonstrates robust deployability across target projects built with JDKs 8, 11, and 17, while achieving strong effectiveness on a Spring-core release requiring JDK 17. Finally, a 14-participant developer survey further suggests that EvoLLM-generated tests ranked higher in readability than those from prior tools and developer-written tests.

链接与引用

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

BibTeX
@inproceedings{paperbot12345,
  title = {EvoLLM: High-Coverage, Readable, and Token-Efficient Unit Test Generation for Industrial Java Codebases},
  author = {Seokhyeon Moon and Myungho Lee and Jihun Kim and Yoon-Chan Jhi and Jihoon Cho and Hakjoo Oh},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3834525}
}