Lune

FSE2025Top-tier venue

CoverUp: Effective High Coverage Test Generation for Python

Juan Altmayer Pizzorno, Emery D. Berger

Abstract

Testing is an essential part of software development. Test generation tools attempt to automate the otherwise labor-intensive task of test creation, but generating high-coverage tests remains challenging. This paper proposes CoverUp, a novel approach to driving the generation of high-coverage Python regression tests. CoverUp combines coverage analysis, code context, and feedback in prompts that iteratively guide the LLM to generate tests that improve line and branch coverage. We evaluate our prototype CoverUp implementation across a benchmark of challenging code derived from open-source Python projects and show that CoverUp substantially improves on the state of the art. Compared to CodaMosa, a hybrid search/LLM-based test generator, CoverUp achieves a per-module median line+branch coverage of 80% (vs. 47%). Compared to MuTAP, a mutation-and LLM-based test generator, CoverUp achieves an overall line+branch coverage of 89% (vs. 77%). We also demonstrate that CoverUp's performance stems not only from the LLM used but from the combined effectiveness of its components.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

22 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Knowledge Matters: Injecting Project and Testing Knowledge into LLM-based Unit Test Generation cites CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
  • Knowledge Matters: Injecting Project and Testing Knowledge into LLM-based Unit Test Generation cites Code-Aware Prompting: A Study of Coverage-Guided Test Generation in Regression Setting using LLM
  • LLM Test Generation via Iterative Hybrid Program Analysis cites CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
  • LLM Test Generation via Iterative Hybrid Program Analysis cites Code-Aware Prompting: A Study of Coverage-Guided Test Generation in Regression Setting using LLM
  • Fuzz4All: Universal Fuzzing with Large Language Models cites CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
  • Demystifying LLM-Based Software Engineering Agents cites CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
  • ChangeGuard: Validating Code Changes via Pairwise Learning-Guided Execution cites CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
  • ChangeGuard: Validating Code Changes via Pairwise Learning-Guided Execution cites Code-Aware Prompting: A Study of Coverage-Guided Test Generation in Regression Setting using LLM
  • Code-Aware Prompting: A Study of Coverage-Guided Test Generation in Regression Setting using LLM cites CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers22

  1. Demystifying LLM-Based Software Engineering AgentsChunqiu Steven Xia, Yinlin Deng, Soren Dunn, Lingming ZhangFSE 2025 · 36 citations
  2. Learning to Generate Unit Test via Adversarial Reinforcement LearningDongjun Lee, Changho Hwang, Kimin LeeICLR 2026 · 14 citations
  3. LLM Test Generation via Iterative Hybrid Program AnalysisSijia Gu, Noor Nashid, Ali MesbahICSE 2026 · 6 citations
  4. ChangeGuard: Validating Code Changes via Pairwise Learning-Guided ExecutionLars Gröninger, Beatriz Souza, Michael PradelFSE 2025 · 4 citations
  5. Knowledge Matters: Injecting Project and Testing Knowledge into LLM-based Unit Test GenerationAnji Li, Mingwei Liu, Zhenxi Chen, Zheng Pei et al.ICSE 2026 · 2 citations

Builds on6

  1. CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language ModelsCaroline Lemieux, Jeevana Priya Inala, Shuvendu K. Lahiri, Siddhartha SenICSE 2023 · 221 citations
  2. Fuzz4All: Universal Fuzzing with Large Language ModelsChunqiu Steven Xia, Matteo Paltenghi, Jia Le Tian, Michael Pradel et al.ICSE 2024 · 155 citations
  3. Code-Aware Prompting: A Study of Coverage-Guided Test Generation in Regression Setting using LLMGabriel Ryan, Siddhartha Jain, Mingyue Shang, Shiqi Wang et al.FSE 2024 · 68 citations
  4. A large-scale longitudinal study of flaky testsWing Lam, Stefan Winter, Anjiang Wei, Tao Xie et al.OOPSLA 2020 · 63 citations
  5. Do Automatic Test Generation Tools Generate Flaky Tests?Martin Gruber, Muhammad Firhard Roslan, Owain Parry, Fabian Scharnböck et al.ICSE 2024 · 12 citations

Related papers

  1. TestTailor: Generating High-Coverage Tests via Path-Proximal Tests with LLMsXiaoxuan Zhou, Yiling Lou, Jinhao Dong, Dan HaoFSE 2026
  2. Beyond Coverage: Automatic Test Suite Augmentation for Enhanced Effectiveness using Large Language ModelsZeyu Lu, Peng Zhang, Yuge Nie, Yibiao Yang et al.OOPSLA 2026 · 1 citation
  3. MuMuTestUp: Mutation-Based Multi-agent Test Case UpdateDawei Tian, Jiakun Liu, Yun Peng, Yichen Zhang et al.ISSTA 2026
  4. TestWeaver: Execution-aware, Feedback-driven Regression Testing Generation with Large Language ModelsCuong Chi Le, Cuong Duc Van, Tung Duy Vu, Minh Vu Thai Pham et al.ICSE 2026 · 1 citation
  5. Change And Cover: Last-Mile, Pull Request-Based Regression Test AugmentationZitong Zhou, Matteo Paltenghi, Miryung Kim, Michael PradelICSE 2026
Dusk over the sea between two cliffs drawn in fine vertical lines