mlsanityData to 7 Oct 2026

Effective Test Generation Using Pre-trained Large Language Models and Mutation Testing

arXiv 2308.16557 ↗First posted 31 Aug 2023cs.SEcited by 51

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

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 3; 2024: 16; 2025: 19; 2026: 13.

51 papers.

Sort:

By area:

  1. 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
  2. 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
  3. 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
  4. 2023WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Modelscited by 37
  5. 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
  6. 2024The Future of AI-Driven Software Engineeringcited by 23
  7. 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 21
  8. 2025RPG: A Repository Planning Graph for Unified and Scalable Codebase Generationcited by 18
  9. 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
  10. 2024Leveraging Large Language Models for Enhancing the Understandability of Generated Unit Testscited by 11
  11. 2025Learning to Generate Unit Test via Adversarial Reinforcement Learningcited by 11
  12. 2024RepoMasterEval: Evaluating Code Completion via Real-World Repositoriescited by 10
38 more
  1. 2024Enhancing Computer Programming Education with LLMs: A Study on Effective Prompt Engineering for Python Code Generationcited by 9
  2. 2024B4: Towards Optimal Assessment of Plausible Code Solutions with Plausible Testscited by 9
  3. 2024When Fuzzing Meets LLMs: Challenges and Opportunitiescited by 8
  4. 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 8
  5. 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
  6. 2025Benchmarking LLMs for Unit Test Generation from Real-World Functionscited by 8
  7. 2025Evaluating LLM-Based Regression Test Generationcited by 6
  8. 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generationcited by 6
  9. 2024Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithmcited by 5
  10. 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanismscited by 4
  11. 2025LogiCase: Effective Test Case Generation from Logical Description in Competitive Programmingcited by 4
  12. 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
  13. 2024Chain of Targeted Verification Questions to Improve the Reliability of Code Generated by LLMscited by 3
  14. 2024Toward Automated Validation of Language Model Synthesized Test Cases using Semantic Entropycited by 3
  15. 2024LLMs in the Heart of Differential Testing: A Case Study on a Medical Rule Enginecited by 2
  16. 2024Generative transformations and patterns in LLM-native approaches for software verification and falsificationcited by 2
  17. 2024Design choices made by LLM-based test generators prevent them from finding bugscited by 2
  18. 2025DiffuTester: Accelerating Unit Test Generation for Diffusion LLMs via Mining Structural Patterncited by 2
  19. 2026RM -RF: Reward Model for Run-Free Unit Test Evaluationcited by 2
  20. 2025PRIMG : Efficient LLM-driven Test Generation Using Mutant Prioritizationcited by 1
  21. 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Frameworkcited by 1
  22. 2025LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generationcited by 1
  23. 2025LLMs for Automated Unit Test Generation and Assessment in Java: The AgoneTest Frameworkcited by 1
  24. 2026All Smoke, No Alarm: Oracle Signals in Agent-Authored Test Codecited by 1
  25. 2024Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 0
  26. 2025Unify and Triumph: Polyglot, Diverse, and Self-Consistent Generation of Unit Tests with LLMscited by 0
  27. 2025SAGE:Specification-Aware Grammar Extraction for Automated Test Case Generation with LLMscited by 0
  28. 2025ACT: Bridging the Gap in Code Translation through Synthetic Data Generation & Adaptive Trainingcited by 0
  29. 2025DUET: Agentic Design Understanding via Experimentation and Testingcited by 0
  30. 2026An empirical study of LoRA-based fine-tuning of large language models for automated test case generationcited by 0
  31. 2026Program Structure-aware Language Models: Targeted Software Testing beyond Textual Semanticscited by 0
  32. 2026PBT-Bench: Benchmarking AI Agents on Property-Based Testingcited by 0
  33. 2026A semantic mutation metric for metamorphic relation adequacy in scientific computing programscited by 0
  34. 2026MuMuTestUp: Mutation-based Multi-Agent Test Case Updatecited by 0
  35. 2026Library-Aware Doubles and Iterative Repair for Large Language Model-Generated Unit Tests in OpenSIL Firmwarecited by 0
  36. 2026Gimitest: A Comprehensive Tool for Testing Reinforcement Learning Policiescited by 0
  37. 2026Do Coverage and Mutation Scores of LLM-Generated Test Suites Correlate with Their Effectiveness? (Replicability Study)cited by 0
  38. 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Testscited by 0

50 most cited of 51 All 51 (JSON)