PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
March 28, 2026ACM Transactions on Software Engineering and Methodology1 citations

Enhancing Automated Unit Test Generation with Large Language Models: A Systematic Literature Review

View Full Paper
JZJunwei ZhangXHXing HuCGCuiyun Gao

Key Points

  • This review aims to synthesize existing literature on LLM-based automated unit test generation, addressing key research questions.
  • Conducted a systematic literature review of 116 papers on LLM-based unit test generation.
  • Identified and categorized research on various testing tasks and adaptation strategies for LLMs.
  • Analyzed dataset characteristics and evaluation practices in existing studies.
  • Current research mainly focuses on function- and class-level test generation.
  • Significant disparities exist in dataset characteristics and programming language coverage.
  • Promising future research directions include dataset optimization and benchmark enhancement.

Abstract

Automated unit test generation is a fundamental yet challenging task in software engineering, playing a critical role in ensuring software correctness, reliability, and maintainability. While traditional approaches such as search-based software testing and symbolic execution have achieved notable success, they often suffer from limited semantic understanding, high configuration costs, and scalability constraints. Recent advances in Large Language Models (LLMs) have fundamentally reshaped the landscape of automated unit testing by enabling models to reason over source code semantics and generate executable, context-aware test cases. Despite the rapid growth of this research area, a comprehensive and task-oriented synthesis of existing work remains lacking. This paper presents a systematic literature review of LLM-based unit test generation. This review draws on research from leading SE and AI conferences and journals, including 69 papers published across 25 distinct venues, along with 47 high-quality preprint papers, bringing the total to 116. Our review aims to answer three key research questions: (1) which unit testing tasks have been addressed using LLMs, (2) how LLMs are adapted and integrated into the unit test generation pipeline, and (3) what datasets, benchmarks, and evaluation practices are employed in existing studies. To this end, we organize the literature from a task-centric perspective, covering test generation, test input generation, test oracle generation, and test evolution, and from a methodological perspective, categorizing LLM adaptation strategies into fine-tuning, prompt engineering, and agent-based approaches. Our analysis reveals that current research predominantly focuses on function- and class-level test generation, with comparatively limited attention given to test input generation, oracle construction, and long-term test evolution. Decoder-only LLMs, particularly GPT-family and LLaMA-based models, dominate the field, while encoder-only and encoder–decoder models remain underexplored. We further observe substantial disparities in dataset characteristics, programming language coverage, and evaluation metrics, which hinder fair comparison and reproducibility across studies. Based on empirical evidence extracted from the surveyed literature, we identify key challenges facing LLM-based unit test generation. Building on these findings, we outline several promising research directions, such as dataset optimization, structure-aware context modeling, agent coordination mechanisms, and benchmark enhancement. This review provides a consolidated and evidence-driven foundation for future research, aiming to advance the development of scalable, reliable, and practically applicable LLM-driven unit testing techniques.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Zhang et al. (2026) studied this question.

synapsesocial.com/papers/69c772938bbfbc51511e31achttps://doi.org/10.1145/3802827
Ask AI
Helpful
Bookmark
Share
View Full Paper

Also Consider

Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context:

  1. 1Using Large Language Models for Student-Code Guided Test Case Generation in Computer Science Education2024 · 3 citations
  2. 2Reference-Based Retrieval-Augmented Unit Test Generation2025 · 2 citations
  3. 3QuixBugs: a multi-lingual program repair benchmark set based on the quixey challenge2017 · 238 citations
  4. 4Issue2Test: Generating Reproducing Test Cases from Issue Reports2026 · 1 citations
  5. 5Do LLMs generate test oracles that capture the actual or the expected program behaviour?2024 · 2 citations