An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generation
Not on the map. Why?
Cited by 41 in LLM agents and tool use, but placed by its own abstract, which didn’t fit.
Abstract (arXiv)
Unit tests play a key role in ensuring the correctness of software. However, manually creating unit tests is a laborious task, motivating the need for automation. Large Language Models (LLMs) have recently been applied to this problem, utilizing additional training or few-shot learning on examples of existing tests. This paper presents a large-scale empirical evaluation on the effectiveness of LLMs for automated unit test generation without additional training or manual effort, providing the LLM with the signature and implementation of the function under test, along with usage examples extracted from documentation. We also attempt to repair failed generated tests by re-prompting the model with the failing test and error message. We implement our approach in TestPilot, a test generation tool for JavaScript that automatically generates unit tests for all API functions in an npm package. We evaluate TestPilot using OpenAI's gpt3.5-turbo LLM on 25 npm packages with a total of 1,684 API functions. The generated tests achieve a median statement coverage of 70.2% and branch coverage of 52.8%, significantly improving on Nessie, a recent feedback-directed JavaScript test generation technique, which achieves only 51.3% statement coverage and 25.6% branch coverage. We also find that 92.8% of TestPilot's generated tests have no more than 50% similarity with existing tests (as measured by normalized edit distance), with none of them being exact copies. Finally, we run TestPilot with two additional LLMs, OpenAI's older code-cushman-002 LLM and the open LLM StarCoder. Overall, we observed similar results with the former (68.2% median statement coverage), and somewhat worse results with the latter (54.0% median statement coverage), suggesting that the effectiveness of the approach is influenced by the size and training set of the LLM, but does not fundamentally depend on the specific model.
Key facts. Cited by 193 papers in the map (data through 7 Oct 2026). Builds on 23 of its 94 references that are in the map. First posted on arXiv 13 Feb 2023.
Builds on
23 of 94 references.
References · 23
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 599
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
- 2017Learning to Represent Programs with Graphscited by 219
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2020Code Prediction by Feeding Trees to Transformerscited by 70
- 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
11 more
- 2018DeepBugs: A Learning Approach to Name-based Bug Detectioncited by 65
- 2021Self-Supervised Bug Detection and Repaircited by 59
- 2021TOGA: A Neural Method for Test Oracle Generationcited by 57
- 2020Big Code != Big Vocabulary: Open-Vocabulary Models for Source Codecited by 53
- 2022Interactive Code Generation via Test-Driven User-Intent Formalizationcited by 50
- 2017Code Completion with Neural Attention and Pointer Networkscited by 49
- 2020On Learning Meaningful Assert Statements for Unit Test Casescited by 42
- 2022Code Generation Tools (Almost) for Free? A Study of Few-Shot, Pre-Trained Language Models on Codecited by 39
- 2020Generating Accurate Assert Statements for Unit Test Cases using Pretrained Transformerscited by 30
- 2022Using Transfer Learning for Code-Related Taskscited by 18
- 2020Neural Software Analysiscited by 11
Built on by
Citing papers per year: 2023: 14; 2024: 56; 2025: 62; 2026: 61.
193 papers.
Sort:
By area:
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
- 2025SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software Evolutioncited by 246
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
- 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agentscited by 129
- 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
- 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMscited by 57
- 2025Co-Evolving LLM Coder and Unit Tester via Reinforcement Learningcited by 51
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projectscited by 45
38 more
- 2024Human-In-the-Loop Software Development Agentscited by 42
- 2023LLM4EDA: Emerging Progress in Large Language Models for Electronic Design Automationcited by 40
- 2024Can LLMs Replace Manual Annotation of Software Engineering Artifacts?cited by 40
- 2025A Survey of Research in Large Language Models for Electronic Design Automationcited by 38
- 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
- 2024SOEN-101: Code Generation by Emulating Software Process Models Using Large Language Model Agentscited by 34
- 2024Data-driven Discovery with Large Generative Modelscited by 33
- 2024Test-Driven Development for Code Generationcited by 32
- 2023Learning Deep Semantics for Test Completioncited by 31
- 2024Large Language Models as Test Case Generators: Performance Evaluation and Enhancementcited by 27
- 2024MHPP: Exploring the Capabilities and Limitations of Language Models Beyond Basic Code Generationcited by 25
- 2025Otter: Generating Tests from Issues to Validate SWE Patchescited by 24
- 2024The Future of AI-Driven Software Engineeringcited by 23
- 2025Mutation-Guided LLM-based Test Generation at Metacited by 23
- 2024The Landscape and Challenges of HPC Research and LLMscited by 22
- 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 21
- 2023LLM4DV: Using Large Language Models for Hardware Test Stimuli Generationcited by 21
- 2024Performance-Aligned LLMs for Generating Fast Codecited by 20
- 2025Agentic Bug Reproduction for Effective Automated Program Repair at Googlecited by 20
- 2024Divide-and-Conquer Meets Consensus: Unleashing the Power of Functions in Code Generationcited by 19
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representationscited by 17
- 2025Learning to Generate Unit Tests for Automated Debuggingcited by 16
- 2026SWE-Universe: Scale Real-World Verifiable Environments to Millionscited by 16
- 2023LLM4VV: Developing LLM-Driven Testsuite for Compiler Validationcited by 15
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
- 2023CodeFuse-13B: A Pretrained Multi-lingual Code Large Language Modelcited by 14
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programscited by 14
- 2025CoCoEvo: Co-Evolution of Programs and Test Cases to Enhance Code Generationcited by 14
- 2025Migrating Code At Scale With LLMs At Googlecited by 14
- 2023Unit Test Generation using Generative AI : A Comparative Performance Analysis of Autogeneration Toolscited by 13
- 2024The Impact of Prompt Programming on Function-Level Code Generationcited by 13
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2024Leveraging Large Language Models for Enhancing the Understandability of Generated Unit Testscited by 11
- 2024LLMs: A Game-Changer for Software Engineers?cited by 11
- 2025ClassInvGen: Class Invariant Synthesis using Large Language Modelscited by 11
- 2026TrajAudit: Automated Failure Diagnosis for Agentic Coding Systemscited by 11
- 2024JavaBench: A Benchmark of Object-Oriented Code Generation for Evaluating Large Language Modelscited by 10
- 2024RepoMasterEval: Evaluating Code Completion via Real-World Repositoriescited by 10
50 most cited of 193 All 193 (JSON)
- 2026From Code to Requirements: Agentic Reverse Engineering of Business Rules at Enterprise Scale19 Sep 2026
- 2026VibeCheck: Assessing the Quality of LLM-Generated Unit Tests: A Multi-agent Empirical Study across Heterogeneous Repositories5 Sep 2026
- 2026Ockhamareto: Pareto-Gated Segment-Level Credit Assignment for Concise Unit-Test Generation with Reinforcement Learning25 Aug 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
- 2026The Quality of Claude AI-authored Python Tests Is Not Weaker Than Human-authored Tests15 Aug 2026
- 2026Developing LLM-based Multi-Agent Systems in Software Engineering: A Mixed-Method Experience Report12 Aug 2026
- 2026Can LLMs Test Terminal User Interfaces?4 Aug 2026
- 2026(Towards) Scalable Reliable Automated Evaluation with Large Language Models30 Jul 2026
- 2026Agentic Method for Deterministic Validation of Legacy Code Migration30 Jul 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
38 more
- 2026Understanding Agent-Reactive Bugs at the Model-Harness Boundary: An Empirical Study of LLM Agent Issue Reports17 Jul 2026
- 2026Fail-Aware and Explainable Test Oracle Prediction13 Jul 2026
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generation9 Jul 2026
- 2026Rethinking Code Performance Benchmarks for LLMs8 Jul 2026
- 2026Gimitest: A Comprehensive Tool for Testing Reinforcement Learning Policies8 Jul 2026
- 2026Mining Workflow Graphs for Black-Box Boundary Testing of Conversational LLM Agents8 Jul 2026
- 2026TestEvo-Bench: An Executable and Live Benchmark for Test and Code Co-Evolution2 Jul 2026
- 2026Cheap Code, Costly Judgment: A Case Study on Governable Agentic Software Engineering1 Jul 2026
- 2026From Registry to Repository: How AI Agent Skills Are Written, Adapted, and Maintained1 Jul 2026
- 2026IntentTester: Intent-Driven Multi-agent Framework for Cross-Library Test Migration24 Jun 2026
- 2026Context-Aware Generative AI for Automated Telecom Test Script Generation19 Jun 2026
- 2026Library-Aware Doubles and Iterative Repair for Large Language Model-Generated Unit Tests in OpenSIL Firmware18 Jun 2026
- 2026Inferring Code Correctness from Specification28 May 2026
- 2026STAB: Specification-driven Testing for Algorithmic Bottlenecks27 May 2026
- 2026TrajAudit: Automated Failure Diagnosis for Agentic Coding Systems26 May 2026
- 2026A Tertiary Review of Large Language Model-Based Code Generating Tasks: Trends, Challenges, and Future Directions25 May 2026
- 2026AINTMA: Agentic AI Architecture for Autonomous Test Management with Generative Intelligence, Secure Cloud Communication and Adaptive Quality Analytics14 May 2026
- 2026Solvita: Enhancing Large Language Models for Competitive Programming via Agentic Evolution14 May 2026
- 2026Autonomous Intelligent Agents for Natural-Language-Driven Web Execution with Integrated Security Assurance14 May 2026
- 2026Breaking, Stale, or Missing? Benchmarking Coding Agents on Project-Level Test Evolution7 May 2026
- 2026An Empirical Study of Proactive Coding Assistants in Real-World Software Development7 May 2026
- 2026FeedbackLLM: Metadata driven Multi-Agentic Language Agnostic Test Case Generator with Evolving prompt and Coverage Feedback2 May 2026
- 2026PPO guided Agentic Pipeline for Adaptive Prompt Selection and Test Case Generation1 May 2026
- 2026On the Footprints of Reviewer Bots Feedback on Agentic Pull Requests in OSS GitHub Repositories27 Apr 2026
- 2026Call-Chain-Aware LLM-Based Test Generation for Java Projects23 Apr 2026
- 2026Co-Located Tests, Better AI Code: How Test Syntax Structure Affects Foundation Model Code Generation20 Apr 2026
- 2026Program Structure-aware Language Models: Targeted Software Testing beyond Textual Semantics20 Apr 2026
- 2026Enhancing Large Language Models with Retrieval Augmented Generation for Software Testing and Inspection Automation16 Apr 2026
- 2026MR-Coupler: Automated Metamorphic Test Generation via Functional Coupling Analysis11 Apr 2026
- 2026An empirical study of LoRA-based fine-tuning of large language models for automated test case generation8 Apr 2026
- 2026Planning to Explore: Curiosity-Driven Planning for LLM Test Generation6 Apr 2026
- 2026AI-Assisted Unit Test Writing and Test-Driven Code Refactoring: A Case Study3 Apr 2026
- 2026Fuzzing with Agents? Generators Are All You Need1 Apr 2026
- 2026TuneShift-KD: Knowledge Distillation and Transfer for Fine-tuned Models25 Mar 2026
- 2026LLMLOOP: Improving LLM-Generated Code and Tests through Automated Iterative Feedback Loops24 Mar 2026
- 2026Evaluating LLM-Based Test Generation Under Software Evolution24 Mar 2026
- 2026Design-Specification Tiling for ICL-based CAD Code Generation13 Mar 2026
- 2026MIST-RL: Mutation-based Incremental Suite Testing via Reinforcement Learning2 Mar 2026
50 newest of 193 All 193 (JSON)
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
- 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agentscited by 129
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projectscited by 45
- 2024Human-In-the-Loop Software Development Agentscited by 42
- 2024SOEN-101: Code Generation by Emulating Software Process Models Using Large Language Model Agentscited by 34
- 2025Agentic Bug Reproduction for Effective Automated Program Repair at Googlecited by 20
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2026TrajAudit: Automated Failure Diagnosis for Agentic Coding Systemscited by 11
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 8
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2026LLM-Based Agentic Systems for Software Engineering: Challenges and Opportunitiescited by 7
12 most cited of 41 All 41 (JSON)
- 2026From Code to Requirements: Agentic Reverse Engineering of Business Rules at Enterprise Scale19 Sep 2026
- 2026VibeCheck: Assessing the Quality of LLM-Generated Unit Tests: A Multi-agent Empirical Study across Heterogeneous Repositories5 Sep 2026
- 2026Developing LLM-based Multi-Agent Systems in Software Engineering: A Mixed-Method Experience Report12 Aug 2026
- 2026Agentic Method for Deterministic Validation of Legacy Code Migration30 Jul 2026
- 2026Understanding Agent-Reactive Bugs at the Model-Harness Boundary: An Empirical Study of LLM Agent Issue Reports17 Jul 2026
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generation9 Jul 2026
- 2026Mining Workflow Graphs for Black-Box Boundary Testing of Conversational LLM Agents8 Jul 2026
- 2026Cheap Code, Costly Judgment: A Case Study on Governable Agentic Software Engineering1 Jul 2026
- 2026From Registry to Repository: How AI Agent Skills Are Written, Adapted, and Maintained1 Jul 2026
- 2026IntentTester: Intent-Driven Multi-agent Framework for Cross-Library Test Migration24 Jun 2026
- 2026TrajAudit: Automated Failure Diagnosis for Agentic Coding Systems26 May 2026
- 2026AINTMA: Agentic AI Architecture for Autonomous Test Management with Generative Intelligence, Secure Cloud Communication and Adaptive Quality Analytics14 May 2026
12 newest of 41 All 41 (JSON)
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2025SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software Evolutioncited by 246
- 2025Instantiation-based Formalization of Logical Reasoning Tasks using Language Models and Logical Solverscited by 7
- 2024An Insight into Security Code Review with LLMs: Capabilities, Obstacles, and Influential Factorscited by 6
- 2024Does Few-Shot Learning Help LLM Performance in Code Synthesis?cited by 6
- 2026MapVerse: A Benchmark for Geospatial Question Answering on Diverse Real-World Mapscited by 0
- 2026SPARC: Scenario Planning and Reasoning for Automated C Unit Test Generationcited by 0
- 2026Rethinking Code Performance Benchmarks for LLMscited by 0
- 2026Ockhamareto: Pareto-Gated Segment-Level Credit Assignment for Concise Unit-Test Generation with Reinforcement Learningcited by 0
- 2026Ockhamareto: Pareto-Gated Segment-Level Credit Assignment for Concise Unit-Test Generation with Reinforcement Learning25 Aug 2026
- 2026Rethinking Code Performance Benchmarks for LLMs8 Jul 2026
- 2026SPARC: Scenario Planning and Reasoning for Automated C Unit Test Generation18 Feb 2026
- 2026MapVerse: A Benchmark for Geospatial Question Answering on Diverse Real-World Maps11 Feb 2026
- 2025SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software Evolution25 Feb 2025
- 2025Instantiation-based Formalization of Logical Reasoning Tasks using Language Models and Logical Solvers28 Jan 2025
- 2024Does Few-Shot Learning Help LLM Performance in Code Synthesis?3 Dec 2024
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar 2024
- 2024An Insight into Security Code Review with LLMs: Capabilities, Obstacles, and Influential Factors29 Jan 2024
- 2024Retrieval-Augmented Test Generation: How Far Are We?cited by 7
- 2025RAGVA: Engineering Retrieval Augmented Generation-based Virtual Assistants in Practicecited by 6
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Modelscited by 4
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Trainingcited by 2
- 2026Enhancing Large Language Models with Retrieval Augmented Generation for Software Testing and Inspection Automationcited by 0
- 2026Enhancing Large Language Models with Retrieval Augmented Generation for Software Testing and Inspection Automation16 Apr 2026
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Models22 Feb 2025
- 2025RAGVA: Engineering Retrieval Augmented Generation-based Virtual Assistants in Practice20 Feb 2025
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Training15 Feb 2025
- 2024Retrieval-Augmented Test Generation: How Far Are We?19 Sep 2024
- 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
- 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
- 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMscited by 57
- 2025Co-Evolving LLM Coder and Unit Tester via Reinforcement Learningcited by 51
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2023LLM4EDA: Emerging Progress in Large Language Models for Electronic Design Automationcited by 40
- 2024Can LLMs Replace Manual Annotation of Software Engineering Artifacts?cited by 40
- 2025A Survey of Research in Large Language Models for Electronic Design Automationcited by 38
- 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
- 2024Data-driven Discovery with Large Generative Modelscited by 33
- 2024Test-Driven Development for Code Generationcited by 32
12 most cited of 135 All 135 (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
- 2026The Quality of Claude AI-authored Python Tests Is Not Weaker Than Human-authored Tests15 Aug 2026
- 2026Can LLMs Test Terminal User Interfaces?4 Aug 2026
- 2026(Towards) Scalable Reliable Automated Evaluation with Large Language Models30 Jul 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
- 2026Fail-Aware and Explainable Test Oracle Prediction13 Jul 2026
- 2026Gimitest: A Comprehensive Tool for Testing Reinforcement Learning Policies8 Jul 2026
- 2026TestEvo-Bench: An Executable and Live Benchmark for Test and Code Co-Evolution2 Jul 2026
- 2026Context-Aware Generative AI for Automated Telecom Test Script Generation19 Jun 2026
- 2026Library-Aware Doubles and Iterative Repair for Large Language Model-Generated Unit Tests in OpenSIL Firmware18 Jun 2026
12 newest of 135 All 135 (JSON)