mlsanityData to 7 Oct 2026

Enhancing LLM-Based Test Generation by Eliminating Covered Code

arXiv 2602.21997 ↗First posted 25 Feb 2026cs.SE cs.AI cs.LGcited by 1

Not on the map. Why?

Abstract (arXiv)

Automated test generation is essential for software quality assurance, with coverage rate serving as a key metric to ensure thorough testing. Recent advancements in Large Language Models (LLMs) have shown promise in improving test generation, particularly in achieving higher coverage. However, while existing LLM-based test generation solutions perform well on small, isolated code snippets, they struggle when applied to complex methods under test. To address these issues, we propose a scalable LLM-based unit test generation method. Our approach consists of two key steps. The first step is context information retrieval, which uses both LLMs and static analysis to gather relevant contextual information associated with the complex methods under test. The second step, iterative test generation with code elimination, repeatedly generates unit tests for the code slice, tracks the achieved coverage, and selectively removes code segments that have already been covered. This process simplifies the testing task and mitigates issues arising from token limits or reduced reasoning effectiveness associated with excessively long contexts. Through comprehensive evaluations on open-source projects, our approach outperforms state-of-the-art LLM-based and search-based methods, demonstrating its effectiveness in achieving high coverage on complex methods.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 8 of its 25 references that are in the map. First posted on arXiv 25 Feb 2026.

Builds on

8 of 25 references.

References · 8

  1. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  2. 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
  3. 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
  4. 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 94
  5. 2023No More Manual Tests? Evaluating and Improving ChatGPT for Unit Test Generationcited by 82
  6. 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
  7. 2022Pynguin: Automated Unit Test Generation for Pythoncited by 49
  8. 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.