Skip to content
Book Open access

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

Jul 2026 · SIGSOFT FSE Companion · pp. 79-81 · 0 citations · 12 references
Computer Science

TL;DR

A dataset of LLM-generated broken-to-fixed test pairs is built, where initially failing tests are repaired via a loop under zero-shot, few-shot, and chain-of-thought prompting, and the performance of prompting strategies through repair rate and post-repair coverage is compared.

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.

Read PDF

Similar papers

Conference Jul 2026

Improving LLM-Based Unit Test Generation Through Root-Cause-Driven Prompt Design

This paper addresses automated unit test generation with large language models (LLMs). LLM-based test generation has not yet attained a quality level sufficient for practical use in industry. Although LLMs often reproduce API syntax faithfully, they frequently disregard semantic usage constraints and execution-environm...

Mizuki Yamada, Masahiko Kato, Juichi Takahashi · 0 citations
Review Aug 2026

Refine After Generation: Toward Correct and Concise Patches in LLM-based Program Repair

This paper identifies patch verbosity as a major yet overlooked concern in LLM-based APR and proposes RECAP, a lightweight, plug-and-play adapter that attaches to existing repair frameworks after generation that achieves a substantially better size-correctness tradeoff.

Wen-Qiang Luo, J. Keung, Xiaoyu Shi et al. · 1 citation
Jul 2026

Knowledge-Guided Synthetic Bug Feedback for LLM-Based Unit Test Generation

The results suggest that organizing real-bug mechanisms as retrievable and executable feedback targets is an effective way to guide generated tests toward bug-triggering inputs and behavioral oracles.

Ziheng Wang, Maike Li, Chen Zhi · 0 citations
Preprint Aug 2026

Aging of Prompt Engineering Techniques Across LLM Versions

It is shown that prompt engineering "ages" in a model-family-specific way: Newer GPT models exhibit diminishing or even negative marginal gains from structured prompting, suggesting that instruction-following and reasoning scaffolds are increasingly internalized, whereas Qwen models continue to benefit substantially fr...

A. Rudyk, Julian Oertel, Regina Hebig · 0 citations
Conference Jul 2026

A Dynamic Evaluation Approach to Repository-Level Code Generation Via LLM

Research on LLM-based code generation has achieved strong performance on function-level benchmarks, yet repository-level code generation in real-world projects still faces challenges from cross-file dependencies. Existing studies usually emphasize single-round or final-round outcomes, which limits the analysis of where...

Fuze Kuang, Dongmei Liu, Yong-Li Wang et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.