On the Evaluation of Large Language Models in Unit Test Generation
Not on the map. Why?
Abstract (arXiv)
Unit testing is an essential activity in software development for verifying the correctness of software components. However, manually writing unit tests is challenging and time-consuming. The emergence of Large Language Models (LLMs) offers a new direction for automating unit test generation. Existing research primarily focuses on closed-source LLMs (e.g., ChatGPT and CodeX) with fixed prompting strategies, leaving the capabilities of advanced open-source LLMs with various prompting settings unexplored. Particularly, open-source LLMs offer advantages in data privacy protection and have demonstrated superior performance in some tasks. Moreover, effective prompting is crucial for maximizing LLMs' capabilities. In this paper, we conduct the first empirical study to fill this gap, based on 17 Java projects, five widely-used open-source LLMs with different structures and parameter sizes, and comprehensive evaluation metrics. Our findings highlight the significant influence of various prompt factors, show the performance of open-source LLMs compared to the commercial GPT-4 and the traditional Evosuite, and identify limitations in LLM-based unit test generation. We then derive a series of implications from our study to guide future research and practical use of LLM-based unit test generation.
Key facts. Cited by 34 papers in the map (data through 14 Oct 2026). First posted on arXiv 26 Jun 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 2; 2025: 17; 2026: 15.
34 papers.
Sort:
By area:
- 2025KodCode: A Diverse, Challenging, and Verifiable Synthetic Dataset for Codingcited by 119
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 15
- 2025Beyond Scaling Law: A Data-Efficient Distillation Framework for Reasoningcited by 11
- 2025PromptPex: Automatic Test Generation for Language Model Promptscited by 9
- 2025LLM Test Generation via Iterative Hybrid Program Analysiscited by 9
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 9
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 9
- 2025LLMs' Reshaping of People, Processes, Products, and Society in Software Development: A Comprehensive Exploration with Early Adopterscited by 8
- 2024Retrieval-Augmented Test Generation: How Far Are We?cited by 7
- 2025Are Autonomous Web Agents Good Testers?cited by 6
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Modelscited by 4
- 2025Clarifying Semantics of In-Context Examples for Unit Test Generationcited by 3
22 more
- 2025QiMeng-MuPa: Mutual-Supervised Learning for Sequential-to-Parallel Code Translationcited by 2
- 2025Large Language Models for Software Testing: A Research Roadmapcited by 2
- 2026Understanding LLM-Driven Test Oracle Generationcited by 2
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalencecited by 2
- 2025A Systematic Approach for Assessing Large Language Models' Test Case Generation Capabilitycited by 1
- 2025Test Amplification for REST APIs via Single and Multi-Agent LLM Systemscited by 1
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Frameworkcited by 1
- 2026Towards Knowledge Alignment in Code LLMs: Contrastive Unlearning for Evolving APIscited by 1
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generationcited by 1
- 2024Test-driven Software Experimentation with LASSO: an LLM Prompt Benchmarking Examplecited by 0
- 2025Agentic LLMs for REST API Test Amplification: A Comparative Study Across Cloud Applicationscited by 0
- 2026TAM-Eval: Evaluating LLMs for Automated Unit Test Maintenancecited by 0
- 2026SWE-Spot: Building Small Repo-Experts with Repository-Centric Learningcited by 0
- 2026Synthesizing File-Level Data for Unit Test Generation with Chain-of-Thoughts via Self-Debuggingcited by 0
- 2026WebMAC: A Multi-Agent Collaborative Framework for Scenario Testing of Web Systemscited by 0
- 2026Library-Aware Doubles and Iterative Repair for Large Language Model-Generated Unit Tests in OpenSIL Firmwarecited by 0
- 2026Do Coverage and Mutation Scores of LLM-Generated Test Suites Correlate with Their Effectiveness? (Replicability Study)cited by 0
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Testscited by 0
- 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregationcited by 0
- 2026Measuring What a Specification Determines: A Formal Semantic-Block Model and an Execution-Judged Benchmarkcited by 0
- 2026SDAD: Spec-Driven Agentic Development for the AI-Native SDLCcited by 0
- 2026VibeCheck: Assessing the Quality of LLM-Generated Unit Tests: A Multi-agent Empirical Study across Heterogeneous Repositoriescited by 0
- 2026VibeCheck: Assessing the Quality of LLM-Generated Unit Tests: A Multi-agent Empirical Study across Heterogeneous Repositories5 Sep 2026
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalence25 Aug 2026
- 2026Measuring What a Specification Determines: A Formal Semantic-Block Model and an Execution-Judged Benchmark19 Aug 2026
- 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregation6 Aug 2026
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026Do Coverage and Mutation Scores of LLM-Generated Test Suites Correlate with Their Effectiveness? (Replicability Study)24 Jul 2026
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generation9 Jul 2026
- 2026Towards Knowledge Alignment in Code LLMs: Contrastive Unlearning for Evolving APIs29 Jun 2026
- 2026Library-Aware Doubles and Iterative Repair for Large Language Model-Generated Unit Tests in OpenSIL Firmware18 Jun 2026
- 2026SDAD: Spec-Driven Agentic Development for the AI-Native SDLC5 May 2026
- 2026WebMAC: A Multi-Agent Collaborative Framework for Scenario Testing of Web Systems15 Apr 2026
- 2026Synthesizing File-Level Data for Unit Test Generation with Chain-of-Thoughts via Self-Debugging3 Feb 2026
22 more
- 2026SWE-Spot: Building Small Repo-Experts with Repository-Centric Learning29 Jan 2026
- 2026TAM-Eval: Evaluating LLMs for Automated Unit Test Maintenance26 Jan 2026
- 2026Understanding LLM-Driven Test Oracle Generation9 Jan 2026
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025Agentic LLMs for REST API Test Amplification: A Comparative Study Across Cloud Applications31 Oct 2025
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Framework20 Oct 2025
- 2025Clarifying Semantics of In-Context Examples for Unit Test Generation2 Oct 2025
- 2025Large Language Models for Software Testing: A Research Roadmap29 Sep 2025
- 2025Beyond Scaling Law: A Data-Efficient Distillation Framework for Reasoning13 Aug 2025
- 2025QiMeng-MuPa: Mutual-Supervised Learning for Sequential-to-Parallel Code Translation11 Jun 2025
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation3 Jun 2025
- 2025Test Amplification for REST APIs via Single and Multi-Agent LLM Systems10 Apr 2025
- 2025Are Autonomous Web Agents Good Testers?2 Apr 2025
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generation18 Mar 2025
- 2025LLM Test Generation via Iterative Hybrid Program Analysis17 Mar 2025
- 2025PromptPex: Automatic Test Generation for Language Model Prompts7 Mar 2025
- 2025LLMs' Reshaping of People, Processes, Products, and Society in Software Development: A Comprehensive Exploration with Early Adopters6 Mar 2025
- 2025KodCode: A Diverse, Challenging, and Verifiable Synthetic Dataset for Coding4 Mar 2025
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Models22 Feb 2025
- 2025A Systematic Approach for Assessing Large Language Models' Test Case Generation Capability5 Feb 2025
- 2024Test-driven Software Experimentation with LASSO: an LLM Prompt Benchmarking Example11 Oct 2024
- 2024Retrieval-Augmented Test Generation: How Far Are We?19 Sep 2024
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 15
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 9
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 9
- 2025Are Autonomous Web Agents Good Testers?cited by 6
- 2025Test Amplification for REST APIs via Single and Multi-Agent LLM Systemscited by 1
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generationcited by 1
- 2025Agentic LLMs for REST API Test Amplification: A Comparative Study Across Cloud Applicationscited by 0
- 2026SWE-Spot: Building Small Repo-Experts with Repository-Centric Learningcited by 0
- 2026WebMAC: A Multi-Agent Collaborative Framework for Scenario Testing of Web Systemscited by 0
- 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregationcited by 0
- 2026SDAD: Spec-Driven Agentic Development for the AI-Native SDLCcited by 0
- 2026VibeCheck: Assessing the Quality of LLM-Generated Unit Tests: A Multi-agent Empirical Study across Heterogeneous Repositoriescited by 0
- 2026VibeCheck: Assessing the Quality of LLM-Generated Unit Tests: A Multi-agent Empirical Study across Heterogeneous Repositories5 Sep 2026
- 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregation6 Aug 2026
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generation9 Jul 2026
- 2026SDAD: Spec-Driven Agentic Development for the AI-Native SDLC5 May 2026
- 2026WebMAC: A Multi-Agent Collaborative Framework for Scenario Testing of Web Systems15 Apr 2026
- 2026SWE-Spot: Building Small Repo-Experts with Repository-Centric Learning29 Jan 2026
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025Agentic LLMs for REST API Test Amplification: A Comparative Study Across Cloud Applications31 Oct 2025
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation3 Jun 2025
- 2025Test Amplification for REST APIs via Single and Multi-Agent LLM Systems10 Apr 2025
- 2025Are Autonomous Web Agents Good Testers?2 Apr 2025
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generation18 Mar 2025
- 2025PromptPex: Automatic Test Generation for Language Model Promptscited by 9
- 2025LLM Test Generation via Iterative Hybrid Program Analysiscited by 9
- 2025LLMs' Reshaping of People, Processes, Products, and Society in Software Development: A Comprehensive Exploration with Early Adopterscited by 8
- 2025Clarifying Semantics of In-Context Examples for Unit Test Generationcited by 3
- 2025QiMeng-MuPa: Mutual-Supervised Learning for Sequential-to-Parallel Code Translationcited by 2
- 2025Large Language Models for Software Testing: A Research Roadmapcited by 2
- 2026Understanding LLM-Driven Test Oracle Generationcited by 2
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalencecited by 2
- 2025A Systematic Approach for Assessing Large Language Models' Test Case Generation Capabilitycited by 1
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Frameworkcited by 1
- 2024Test-driven Software Experimentation with LASSO: an LLM Prompt Benchmarking Examplecited by 0
- 2026TAM-Eval: Evaluating LLMs for Automated Unit Test Maintenancecited by 0
12 most cited of 16 All 16 (JSON)
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalence25 Aug 2026
- 2026Measuring What a Specification Determines: A Formal Semantic-Block Model and an Execution-Judged Benchmark19 Aug 2026
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026Do Coverage and Mutation Scores of LLM-Generated Test Suites Correlate with Their Effectiveness? (Replicability Study)24 Jul 2026
- 2026Library-Aware Doubles and Iterative Repair for Large Language Model-Generated Unit Tests in OpenSIL Firmware18 Jun 2026
- 2026TAM-Eval: Evaluating LLMs for Automated Unit Test Maintenance26 Jan 2026
- 2026Understanding LLM-Driven Test Oracle Generation9 Jan 2026
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Framework20 Oct 2025
- 2025Clarifying Semantics of In-Context Examples for Unit Test Generation2 Oct 2025
- 2025Large Language Models for Software Testing: A Research Roadmap29 Sep 2025
- 2025QiMeng-MuPa: Mutual-Supervised Learning for Sequential-to-Parallel Code Translation11 Jun 2025
- 2025LLM Test Generation via Iterative Hybrid Program Analysis17 Mar 2025
12 newest of 16 All 16 (JSON)