mlsanityData to 7 Oct 2026

Call-Chain-Aware LLM-Based Test Generation for Java Projects

arXiv 2604.22046 ↗First posted 23 Apr 2026cs.SE cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have recently shown strong potential for generating project-level unit tests. However, existing state-of-the-art approaches primarily rely on execution-path information to guide prompt construction, which is often insufficient for complex software systems with rich inter-class dependencies, deep call chains, and intricate object initialization requirements. In this paper, we present CAT, a novel call-chain-aware LLM-based test generation approach that explicitly incorporates call-chain and dependency contexts into prompts through dedicated static analysis. To construct executable, semantically valid test contexts, CAT systematically models caller--callee relationships, object constructors, and third-party dependencies, and supports iterative test fixing when generation failures occur. We evaluate CAT on the widely used Defects4J benchmark and on four real-world GitHub projects released after the LLM's cut-off date. The results show that, across projects in Defects4J, CAT improves line and branch coverage by 18.04% and 21.74%, respectively, over the state-of-the-art approach PANTA, while consistently achieving superior performance on post-cutoff real-world projects. An ablation study further demonstrates the importance of call-chain and dependency contexts in CAT.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 10 of its 38 references that are in the map. First posted on arXiv 23 Apr 2026.

Builds on

10 of 38 references.

References · 10

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  3. 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
  4. 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 106
  5. 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
  6. 2024HITS: High-coverage LLM-based Unit Test Generation via Method Slicingcited by 37
  7. 2025LLM Test Generation via Iterative Hybrid Program Analysiscited by 9
  8. 2024Helping LLMs Improve Code Generation Using Feedback from Testing and Static Analysiscited by 6
  9. 2025CITYWALK: Enhancing LLM-Based C++ Unit Test Generation via Project-Dependency Awareness and Language-Specific Knowledgecited by 3
  10. 2025Static Program Analysis Guided LLM Based Unit Test Generationcited by 1

Built on by

Not cited yet.