Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLM
Not on the map. Why?
Abstract (arXiv)
Testing plays a pivotal role in ensuring software quality, yet conventional Search Based Software Testing (SBST) methods often struggle with complex software units, achieving suboptimal test coverage. Recent works using large language models (LLMs) for test generation have focused on improving generation quality through optimizing the test generation context and correcting errors in model outputs, but use fixed prompting strategies that prompt the model to generate tests without additional guidance. As a result LLM-generated testsuites still suffer from low coverage. In this paper, we present SymPrompt, a code-aware prompting strategy for LLMs in test generation. SymPrompt's approach is based on recent work that demonstrates LLMs can solve more complex logical problems when prompted to reason about the problem in a multi-step fashion. We apply this methodology to test generation by deconstructing the testsuite generation process into a multi-stage sequence, each of which is driven by a specific prompt aligned with the execution paths of the method under test, and exposing relevant type and dependency focal context to the model. Our approach enables pretrained LLMs to generate more complete test cases without any additional training. We implement SymPrompt using the TreeSitter parsing framework and evaluate on a benchmark challenging methods from open source Python projects. SymPrompt enhances correct test generations by a factor of 5 and bolsters relative coverage by 26% for CodeGen2. Notably, when applied to GPT-4, SymPrompt improves coverage by over 2x compared to baseline prompting strategies.
Key facts. Cited by 63 papers in the map (data through 7 Oct 2026). Builds on 16 of its 44 references that are in the map. First posted on arXiv 31 Jan 2024.
Builds on
16 of 44 references.
References · 16
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2022The Stack: 3 TB of permissively licensed source codecited by 354
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2023No More Manual Tests? Evaluating and Improving ChatGPT for Unit Test Generationcited by 82
- 2021TOGA: A Neural Method for Test Oracle Generationcited by 57
- 2023Effective Test Generation Using Pre-trained Large Language Models and Mutation Testingcited by 51
- 2022Pynguin: Automated Unit Test Generation for Pythoncited by 49
4 more
- 2022Code Generation Tools (Almost) for Free? A Study of Few-Shot, Pre-Trained Language Models on Codecited by 39
- 2016A Survey of Symbolic Execution Techniquescited by 36
- 2024BugsInPy: A Database of Existing Bugs in Python Programs to Enable Controlled Testing and Debugging Studiescited by 35
- 2020Automated Unit Test Generation for Pythoncited by 18
Built on by
Citing papers per year: 2024: 11; 2025: 31; 2026: 21.
63 papers.
Sort:
By area:
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Futurecited by 85
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projectscited by 45
- 2024Can LLMs Replace Manual Annotation of Software Engineering Artifacts?cited by 40
- 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
- 2024Automatic Programming: Large Language Models and Beyondcited by 35
- 2025Mutation-Guided LLM-based Test Generation at Metacited by 23
- 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
- 2025Agentic AI Software Engineers: Programming with Trustcited by 19
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programscited by 14
- 2024Multi-Programming Language Sandbox for LLMscited by 9
- 2025LLM Test Generation via Iterative Hybrid Program Analysiscited by 9
38 more
- 2025Scoring Verifiers: Evaluating Synthetic Verification for Code and Reasoningcited by 8
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2025SemAgent: A Semantics Aware Program Repair Agentcited by 8
- 2026AgentStepper: Interactive Debugging of Software Development Agentscited by 8
- 2024Retrieval-Augmented Test Generation: How Far Are We?cited by 7
- 2025CLOVER: A Test Case Generation Benchmark with Coverage, Long-Context, and Verificationcited by 7
- 2025On the Effectiveness of Large Language Models in Writing Alloy Formulascited by 7
- 2025Validating Network Protocol Parsers with Traceable RFC Document Interpretationcited by 7
- 2025Evaluating LLM-Based Regression Test Generationcited by 6
- 2025RAGVA: Engineering Retrieval Augmented Generation-based Virtual Assistants in Practicecited by 6
- 2025Large Language Models for Validating Network Protocol Parserscited by 5
- 2026Are Coding Agents Generating Over-Mocked Tests? An Empirical Studycited by 5
- 2024exLong: Generating Exceptional Behavior Tests with Large Language Modelscited by 4
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Modelscited by 4
- 2025Meta-RAG on Large Codebases Using Code Summarizationcited by 4
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Frameworkcited by 4
- 2025AppForge: From Assistant to Independent Developer -- Are GPTs Ready for Software Development?cited by 4
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
- 2026CodeScout: Contextual Problem Statement Enhancement for Software Agentscited by 4
- 2025Clarifying Semantics of In-Context Examples for Unit Test Generationcited by 3
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsificationcited by 2
- 2025Treefix: Enabling Execution with a Tree of Prefixescited by 2
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Modelscited by 2
- 2025A Tool for Generating Exceptional Behavior Tests With Large Language Modelscited by 2
- 2025STAF: Leveraging LLMs for Automated Attack Tree-Based Security Test Generationcited by 2
- 2025Large Language Models for Software Testing: A Research Roadmapcited by 2
- 2025OBsmith: LLM-Powered JavaScript Obfuscator Testingcited by 2
- 2025WhatsCode: Large-Scale GenAI Deployment for Developer Efficiency at WhatsAppcited by 2
- 2026Understanding LLM-Driven Test Oracle Generationcited by 2
- 2026Evaluating LLM-Based Test Generation Under Software Evolutioncited by 2
- 2025Navigating the Labyrinth: Path-Sensitive Unit Test Generation with Large Language Modelscited by 1
- 2025UnitTenX: Generating Tests for Legacy Packages with AI Agents Powered by Formal Verificationcited 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
- 2026Just-in-Time Catching Test Generation at Metacited by 1
- 2026Enhancing LLM-Based Test Generation by Eliminating Covered Codecited by 1
- 2026Program Analysis Guided LLM Agent for Proof-of-Concept Generationcited by 1
- 2026Breaking, Stale, or Missing? Benchmarking Coding Agents on Project-Level Test Evolutioncited by 1
50 most cited of 63 All 63 (JSON)
- 2026Self-Spec Verifiable Code Generation30 Sep 2026
- 2026Beyond Rule-Based Mutation Testing: Test-Aware Mutant Generation Using Large Language Models24 Sep 2026
- 2026Ockhamareto: Pareto-Gated Segment-Level Credit Assignment for Concise Unit-Test Generation with Reinforcement Learning25 Aug 2026
- 2026Test Coverage Analysis of Agentic Pull Requests20 Jul 2026
- 2026Large Language Models for Code Generation from Multilingual Prompts: A Curated Benchmark and a Study on Code Quality16 Jul 2026
- 2026ReProAgent: Tool-Augmented Multi-Stage Agentic Generation of Bug Reproduction Tests from Issue Reports10 Jul 2026
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows10 Jul 2026
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generation9 Jul 2026
- 2026STAB: Specification-driven Testing for Algorithmic Bottlenecks27 May 2026
- 2026Breaking, Stale, or Missing? Benchmarking Coding Agents on Project-Level Test Evolution7 May 2026
- 2026Call-Chain-Aware LLM-Based Test Generation for Java Projects23 Apr 2026
- 2026Program Structure-aware Language Models: Targeted Software Testing beyond Textual Semantics20 Apr 2026
38 more
- 2026Program Analysis Guided LLM Agent for Proof-of-Concept Generation8 Apr 2026
- 2026AI-Assisted Unit Test Writing and Test-Driven Code Refactoring: A Case Study3 Apr 2026
- 2026Evaluating LLM-Based Test Generation Under Software Evolution24 Mar 2026
- 2026CodeScout: Contextual Problem Statement Enhancement for Software Agents5 Mar 2026
- 2026Enhancing LLM-Based Test Generation by Eliminating Covered Code25 Feb 2026
- 2026AgentStepper: Interactive Debugging of Software Development Agents6 Feb 2026
- 2026Are Coding Agents Generating Over-Mocked Tests? An Empirical Study30 Jan 2026
- 2026Just-in-Time Catching Test Generation at Meta30 Jan 2026
- 2026Understanding LLM-Driven Test Oracle Generation9 Jan 2026
- 2025WhatsCode: Large-Scale GenAI Deployment for Developer Efficiency at WhatsApp4 Dec 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
- 2025OBsmith: LLM-Powered JavaScript Obfuscator Testing11 Oct 2025
- 2025AppForge: From Assistant to Independent Developer -- Are GPTs Ready for Software Development?9 Oct 2025
- 2025UnitTenX: Generating Tests for Legacy Packages with AI Agents Powered by Formal Verification6 Oct 2025
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Framework3 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
- 2025Navigating the Labyrinth: Path-Sensitive Unit Test Generation with Large Language Models28 Sep 2025
- 2025STAF: Leveraging LLMs for Automated Attack Tree-Based Security Test Generation24 Sep 2025
- 2025Meta-RAG on Large Codebases Using Code Summarization4 Aug 2025
- 2025ReCatcher: Towards LLMs Regression Testing for Code Generation25 Jul 2025
- 2025SemAgent: A Semantics Aware Program Repair Agent19 Jun 2025
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation3 Jun 2025
- 2025A Tool for Generating Exceptional Behavior Tests With Large Language Models28 May 2025
- 2025Validating Network Protocol Parsers with Traceable RFC Document Interpretation25 Apr 2025
- 2025Large Language Models for Validating Network Protocol Parsers18 Apr 2025
- 2025Frontier AI's Impact on the Cybersecurity Landscape7 Apr 2025
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Models29 Mar 2025
- 2025LLM Test Generation via Iterative Hybrid Program Analysis17 Mar 2025
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Models22 Feb 2025
- 2025On the Effectiveness of Large Language Models in Writing Alloy Formulas21 Feb 2025
- 2025RAGVA: Engineering Retrieval Augmented Generation-based Virtual Assistants in Practice20 Feb 2025
- 2025Scoring Verifiers: Evaluating Synthetic Verification for Code and Reasoning19 Feb 2025
- 2025Agentic AI Software Engineers: Programming with Trust19 Feb 2025
- 2025CLOVER: A Test Case Generation Benchmark with Coverage, Long-Context, and Verification12 Feb 2025
- 2025Mutation-Guided LLM-based Test Generation at Meta22 Jan 2025
50 newest of 63 All 63 (JSON)
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Futurecited by 85
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projectscited by 45
- 2025Agentic AI Software Engineers: Programming with Trustcited by 19
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2025SemAgent: A Semantics Aware Program Repair Agentcited by 8
- 2026AgentStepper: Interactive Debugging of Software Development Agentscited by 8
- 2026Are Coding Agents Generating Over-Mocked Tests? An Empirical Studycited by 5
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Frameworkcited by 4
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
- 2026CodeScout: Contextual Problem Statement Enhancement for Software Agentscited by 4
- 2025UnitTenX: Generating Tests for Legacy Packages with AI Agents Powered by Formal Verificationcited by 1
12 most cited of 18 All 18 (JSON)
- 2026Test Coverage Analysis of Agentic Pull Requests20 Jul 2026
- 2026ReProAgent: Tool-Augmented Multi-Stage Agentic Generation of Bug Reproduction Tests from Issue Reports10 Jul 2026
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows10 Jul 2026
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generation9 Jul 2026
- 2026Breaking, Stale, or Missing? Benchmarking Coding Agents on Project-Level Test Evolution7 May 2026
- 2026Program Analysis Guided LLM Agent for Proof-of-Concept Generation8 Apr 2026
- 2026CodeScout: Contextual Problem Statement Enhancement for Software Agents5 Mar 2026
- 2026AgentStepper: Interactive Debugging of Software Development Agents6 Feb 2026
- 2026Are Coding Agents Generating Over-Mocked Tests? An Empirical Study30 Jan 2026
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesis30 Oct 2025
- 2025UnitTenX: Generating Tests for Legacy Packages with AI Agents Powered by Formal Verification6 Oct 2025
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Framework3 Oct 2025
12 newest of 18 All 18 (JSON)
- 2024Can LLMs Replace Manual Annotation of Software Engineering Artifacts?cited by 40
- 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
- 2024Automatic Programming: Large Language Models and Beyondcited by 35
- 2025Mutation-Guided LLM-based Test Generation at Metacited by 23
- 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programscited by 14
- 2024Multi-Programming Language Sandbox for LLMscited by 9
- 2025LLM Test Generation via Iterative Hybrid Program Analysiscited by 9
- 2025CLOVER: A Test Case Generation Benchmark with Coverage, Long-Context, and Verificationcited by 7
- 2025On the Effectiveness of Large Language Models in Writing Alloy Formulascited by 7
- 2025Validating Network Protocol Parsers with Traceable RFC Document Interpretationcited by 7
- 2025Evaluating LLM-Based Regression Test Generationcited by 6
12 most cited of 40 All 40 (JSON)
- 2026Self-Spec Verifiable Code Generation30 Sep 2026
- 2026Beyond Rule-Based Mutation Testing: Test-Aware Mutant Generation Using Large Language Models24 Sep 2026
- 2026Large Language Models for Code Generation from Multilingual Prompts: A Curated Benchmark and a Study on Code Quality16 Jul 2026
- 2026STAB: Specification-driven Testing for Algorithmic Bottlenecks27 May 2026
- 2026Call-Chain-Aware LLM-Based Test Generation for Java Projects23 Apr 2026
- 2026Program Structure-aware Language Models: Targeted Software Testing beyond Textual Semantics20 Apr 2026
- 2026AI-Assisted Unit Test Writing and Test-Driven Code Refactoring: A Case Study3 Apr 2026
- 2026Evaluating LLM-Based Test Generation Under Software Evolution24 Mar 2026
- 2026Enhancing LLM-Based Test Generation by Eliminating Covered Code25 Feb 2026
- 2026Just-in-Time Catching Test Generation at Meta30 Jan 2026
- 2026Understanding LLM-Driven Test Oracle Generation9 Jan 2026
- 2025WhatsCode: Large-Scale GenAI Deployment for Developer Efficiency at WhatsApp4 Dec 2025
12 newest of 40 All 40 (JSON)