paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A Qualitative and Quantitative Exploration of LLM-Based Test Generation Repair Loops

基于LLM的测试生成修复循环的定性与定量探索
FSE Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering2026匹配度 3/10 · 该论文聚焦于LLM生成单元测试的修复循环及其失败模式分类,属于LLM用于软件测试/调试的实证研究,与用户核心方向(静态分析、形式化验证、浮点程序分析、贝叶斯程序分析及其与LLM的交叉)关联较弱。仅其“迭代修复循环中的失效分析”与Agentic程序失败的观察视角略有重合,但既无静态分析技术,也无可迁移的理论形式化或工业落地分析。引用 0 inbox
Jaskeerat Singh
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:研究LLM生成单元测试的修复循环,构建失败到修复的测试对数据集,归纳修复引入问题的分类法并比较提示策略。

大型语言模型(LLM)流水线能生成语义合理且覆盖率高的单元测试,但生成的测试常无法编译或执行。为此,许多框架采用LLM驱动的修复循环,在失败时迭代重新提示直至验证通过,然而这类修复可能引入新问题,例如为让测试通过而虚构一个不存在的类。本文针对三个Java项目研究修复引入的问题及提示策略的影响。作者构建了一个LLM生成测试的“坏到好”修复对数据集,其中初始失败的测试在zero-shot、few-shot和chain-of-thought提示下经循环修复。基于对117个修复对的人工分析,论文归纳出包含三类反模式和七种场景的分类法,并通过修复率与修复后覆盖率定量比较三种提示策略的性能。

问题
LLM生成的单元测试常无法编译或执行,而驱动修复循环虽能通过验证,却可能引入虚构类等新问题;目前缺乏对修复引入问题及不同提示策略影响的系统研究。
方法
在三个Java项目上,用zero-shot、few-shot和chain-of-thought提示对初始失败的LLM生成测试进行循环修复,构建“坏到好”测试对数据集;人工分析117个修复对并归纳分类法。
评估
通过人工分析117个修复对得到三类反模式与七种场景,并定量比较三种提示策略的修复率与修复后覆盖率。
原文摘要(Abstract)

Large Language Model (LLM) pipelines can generate semantically meaningful unit tests with high coverage, but generated tests often fail to compile or execute. Many frameworks therefore use LLM-driven repair loops that iteratively re-prompt on failures until validation succeeds, but these repairs can introduce issues such as hallucinating an invented class solely to make the test pass. In this paper, we study repair-induced issues and effects of prompt strategy across three Java projects. We build a dataset of LLM-generated broken-to-fixed test pairs, where initially failing tests are repaired via a loop under zero-shot, few-shot, and chain-of-thought prompting, derive a taxonomy from 117 manually analyzed pairs (three anti-pattern categories, seven scenarios), and compare the performance of prompting strategies through repair rate and post-repair coverage.

链接与引用

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

BibTeX
@inproceedings{Singh26,
  title = {A Qualitative and Quantitative Exploration of LLM-Based Test Generation Repair Loops},
  author = {Jaskeerat Singh},
  booktitle = {FSE},
  year = {2026},
  doi = {10.1145/3803437.3804438}
}