Effective Test Generation Using Pre-trained Large Language Models and Mutation Testing
Not on the map. Why?
Abstract (arXiv)
One of the critical phases in software development is software testing. Testing helps with identifying potential bugs and reducing maintenance costs. The goal of automated test generation tools is to ease the development of tests by suggesting efficient bug-revealing tests. Recently, researchers have leveraged Large Language Models (LLMs) of code to generate unit tests. While the code coverage of generated tests was usually assessed, the literature has acknowledged that the coverage is weakly correlated with the efficiency of tests in bug detection. To improve over this limitation, in this paper, we introduce MuTAP for improving the effectiveness of test cases generated by LLMs in terms of revealing bugs by leveraging mutation testing. Our goal is achieved by augmenting prompts with surviving mutants, as those mutants highlight the limitations of test cases in detecting bugs. MuTAP is capable of generating effective test cases in the absence of natural language descriptions of the Program Under Test (PUTs). We employ different LLMs within MuTAP and evaluate their performance on different benchmarks. Our results show that our proposed method is able to detect up to 28% more faulty human-written code snippets. Among these, 17% remained undetected by both the current state-of-the-art fully automated test generation tool (i.e., Pynguin) and zero-shot/few-shot learning approaches on LLMs. Furthermore, MuTAP achieves a Mutation Score (MS) of 93.57% on synthetic buggy code, outperforming all other approaches in our evaluation. Our findings suggest that although LLMs can serve as a useful tool to generate test cases, they require specific post-processing steps to enhance the effectiveness of the generated test cases which may suffer from syntactic or functional errors and may be ineffective in detecting certain types of bugs and testing corner cases PUTs.
Key facts. Cited by 51 papers in the map (data through 7 Oct 2026). First posted on arXiv 31 Aug 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 3; 2024: 16; 2025: 19; 2026: 13.
51 papers.
Sort:
By area:
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2023WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Modelscited by 37
- 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
- 2024The Future of AI-Driven Software Engineeringcited by 23
- 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 21
- 2025RPG: A Repository Planning Graph for Unified and Scalable Codebase Generationcited by 18
- 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
- 2025Learning to Generate Unit Test via Adversarial Reinforcement Learningcited by 11
- 2024RepoMasterEval: Evaluating Code Completion via Real-World Repositoriescited by 10
38 more
- 2024Enhancing Computer Programming Education with LLMs: A Study on Effective Prompt Engineering for Python Code Generationcited by 9
- 2024B4: Towards Optimal Assessment of Plausible Code Solutions with Plausible Testscited by 9
- 2024When Fuzzing Meets LLMs: Challenges and Opportunitiescited by 8
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 8
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2025Benchmarking LLMs for Unit Test Generation from Real-World Functionscited by 8
- 2025Evaluating LLM-Based Regression Test Generationcited by 6
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generationcited by 6
- 2024Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithmcited by 5
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanismscited by 4
- 2025LogiCase: Effective Test Case Generation from Logical Description in Competitive Programmingcited by 4
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
- 2024Chain of Targeted Verification Questions to Improve the Reliability of Code Generated by LLMscited by 3
- 2024Toward Automated Validation of Language Model Synthesized Test Cases using Semantic Entropycited by 3
- 2024LLMs in the Heart of Differential Testing: A Case Study on a Medical Rule Enginecited by 2
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsificationcited by 2
- 2024Design choices made by LLM-based test generators prevent them from finding bugscited by 2
- 2025DiffuTester: Accelerating Unit Test Generation for Diffusion LLMs via Mining Structural Patterncited by 2
- 2026RM -RF: Reward Model for Run-Free Unit Test Evaluationcited by 2
- 2025PRIMG : Efficient LLM-driven Test Generation Using Mutant Prioritizationcited by 1
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Frameworkcited by 1
- 2025LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generationcited by 1
- 2025LLMs for Automated Unit Test Generation and Assessment in Java: The AgoneTest Frameworkcited by 1
- 2026All Smoke, No Alarm: Oracle Signals in Agent-Authored Test Codecited by 1
- 2024Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 0
- 2025Unify and Triumph: Polyglot, Diverse, and Self-Consistent Generation of Unit Tests with LLMscited by 0
- 2025SAGE:Specification-Aware Grammar Extraction for Automated Test Case Generation with LLMscited by 0
- 2025ACT: Bridging the Gap in Code Translation through Synthetic Data Generation & Adaptive Trainingcited by 0
- 2025DUET: Agentic Design Understanding via Experimentation and Testingcited by 0
- 2026An empirical study of LoRA-based fine-tuning of large language models for automated test case generationcited by 0
- 2026Program Structure-aware Language Models: Targeted Software Testing beyond Textual Semanticscited by 0
- 2026PBT-Bench: Benchmarking AI Agents on Property-Based Testingcited by 0
- 2026A semantic mutation metric for metamorphic relation adequacy in scientific computing programscited by 0
- 2026MuMuTestUp: Mutation-based Multi-Agent Test Case Updatecited by 0
- 2026Library-Aware Doubles and Iterative Repair for Large Language Model-Generated Unit Tests in OpenSIL Firmwarecited by 0
- 2026Gimitest: A Comprehensive Tool for Testing Reinforcement Learning Policiescited 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
50 most cited of 51 All 51 (JSON)
- 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generation17 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
- 2026Gimitest: A Comprehensive Tool for Testing Reinforcement Learning Policies8 Jul 2026
- 2026Library-Aware Doubles and Iterative Repair for Large Language Model-Generated Unit Tests in OpenSIL Firmware18 Jun 2026
- 2026All Smoke, No Alarm: Oracle Signals in Agent-Authored Test Code16 Jun 2026
- 2026MuMuTestUp: Mutation-based Multi-Agent Test Case Update19 May 2026
- 2026A semantic mutation metric for metamorphic relation adequacy in scientific computing programs17 May 2026
- 2026PBT-Bench: Benchmarking AI Agents on Property-Based Testing13 May 2026
- 2026Program Structure-aware Language Models: Targeted Software Testing beyond Textual Semantics20 Apr 2026
- 2026An empirical study of LoRA-based fine-tuning of large language models for automated test case generation8 Apr 2026
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generation8 Feb 2026
38 more
- 2026RM -RF: Reward Model for Run-Free Unit Test Evaluation19 Jan 2026
- 2025DUET: Agentic Design Understanding via Experimentation and Testing6 Dec 2025
- 2025LLMs for Automated Unit Test Generation and Assessment in Java: The AgoneTest Framework25 Nov 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesis30 Oct 2025
- 2025LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generation25 Oct 2025
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Framework20 Oct 2025
- 2025DiffuTester: Accelerating Unit Test Generation for Diffusion LLMs via Mining Structural Pattern29 Sep 2025
- 2025RPG: A Repository Planning Graph for Unified and Scalable Codebase Generation19 Sep 2025
- 2025Learning to Generate Unit Test via Adversarial Reinforcement Learning28 Aug 2025
- 2025Benchmarking LLMs for Unit Test Generation from Real-World Functions1 Aug 2025
- 2025ACT: Bridging the Gap in Code Translation through Synthetic Data Generation & Adaptive Training22 Jul 2025
- 2025SAGE:Specification-Aware Grammar Extraction for Automated Test Case Generation with LLMs4 Jun 2025
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation3 Jun 2025
- 2025LogiCase: Effective Test Case Generation from Logical Description in Competitive Programming21 May 2025
- 2025PRIMG : Efficient LLM-driven Test Generation Using Mutant Prioritization8 May 2025
- 2025Unify and Triumph: Polyglot, Diverse, and Self-Consistent Generation of Unit Tests with LLMs20 Mar 2025
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generation18 Mar 2025
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanisms10 Feb 2025
- 2025Evaluating LLM-Based Regression Test Generation19 Jan 2025
- 2024Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generation18 Dec 2024
- 2024Design choices made by LLM-based test generators prevent them from finding bugs18 Dec 2024
- 2024Toward Automated Validation of Language Model Synthesized Test Cases using Semantic Entropy13 Nov 2024
- 2024B4: Towards Optimal Assessment of Plausible Code Solutions with Plausible Tests13 Sep 2024
- 2024Large Language Model-Based Agents for Software Engineering: A Survey4 Sep 2024
- 2024Leveraging Large Language Models for Enhancing the Understandability of Generated Unit Tests21 Aug 2024
- 2024Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithm20 Aug 2024
- 2024RepoMasterEval: Evaluating Code Completion via Real-World Repositories7 Aug 2024
- 2024Enhancing Computer Programming Education with LLMs: A Study on Effective Prompt Engineering for Python Code Generation7 Jul 2024
- 2024The Future of AI-Driven Software Engineering11 Jun 2024
- 2024Chain of Targeted Verification Questions to Improve the Reliability of Code Generated by LLMs22 May 2024
- 2024When Fuzzing Meets LLMs: Challenges and Opportunities25 Apr 2024
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsification14 Apr 2024
- 2024CoverUp: Effective High Coverage Test Generation for Python24 Mar 2024
- 2024LLMs in the Heart of Differential Testing: A Case Study on a Medical Rule Engine16 Feb 2024
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLM31 Jan 2024
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Code14 Nov 2023
- 2023WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Models24 Oct 2023
50 newest of 51 All 51 (JSON)
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 8
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generationcited by 6
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
- 2026All Smoke, No Alarm: Oracle Signals in Agent-Authored Test Codecited by 1
- 2025DUET: Agentic Design Understanding via Experimentation and Testingcited by 0
- 2026PBT-Bench: Benchmarking AI Agents on Property-Based Testingcited by 0
- 2026MuMuTestUp: Mutation-based Multi-Agent Test Case Updatecited by 0
- 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generationcited by 0
- 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generation17 Aug 2026
- 2026All Smoke, No Alarm: Oracle Signals in Agent-Authored Test Code16 Jun 2026
- 2026MuMuTestUp: Mutation-based Multi-Agent Test Case Update19 May 2026
- 2026PBT-Bench: Benchmarking AI Agents on Property-Based Testing13 May 2026
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generation8 Feb 2026
- 2025DUET: Agentic Design Understanding via Experimentation and Testing6 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesis30 Oct 2025
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation3 Jun 2025
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generation18 Mar 2025
- 2024Large Language Model-Based Agents for Software Engineering: A Survey4 Sep 2024
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2023WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Modelscited by 37
- 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
- 2024The Future of AI-Driven Software Engineeringcited by 23
- 2025RPG: A Repository Planning Graph for Unified and Scalable Codebase Generationcited by 18
- 2024Leveraging Large Language Models for Enhancing the Understandability of Generated Unit Testscited by 11
- 2025Learning to Generate Unit Test via Adversarial Reinforcement Learningcited by 11
- 2024RepoMasterEval: Evaluating Code Completion via Real-World Repositoriescited by 10
- 2024Enhancing Computer Programming Education with LLMs: A Study on Effective Prompt Engineering for Python Code Generationcited by 9
- 2024B4: Towards Optimal Assessment of Plausible Code Solutions with Plausible Testscited by 9
- 2024When Fuzzing Meets LLMs: Challenges and Opportunitiescited by 8
12 most cited of 37 All 37 (JSON)
- 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
- 2026Gimitest: A Comprehensive Tool for Testing Reinforcement Learning Policies8 Jul 2026
- 2026Library-Aware Doubles and Iterative Repair for Large Language Model-Generated Unit Tests in OpenSIL Firmware18 Jun 2026
- 2026A semantic mutation metric for metamorphic relation adequacy in scientific computing programs17 May 2026
- 2026Program Structure-aware Language Models: Targeted Software Testing beyond Textual Semantics20 Apr 2026
- 2026An empirical study of LoRA-based fine-tuning of large language models for automated test case generation8 Apr 2026
- 2026RM -RF: Reward Model for Run-Free Unit Test Evaluation19 Jan 2026
- 2025LLMs for Automated Unit Test Generation and Assessment in Java: The AgoneTest Framework25 Nov 2025
- 2025LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generation25 Oct 2025
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Framework20 Oct 2025
- 2025DiffuTester: Accelerating Unit Test Generation for Diffusion LLMs via Mining Structural Pattern29 Sep 2025
12 newest of 37 All 37 (JSON)