YATE: The Role of Test Repair in LLM-Based Unit Test Generation

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Konstantinou, Michael, Degiovanni, Renzo, Zhang, Jie M., Harman, Mark, Papadakis, Mike
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913958938542080
author Konstantinou, Michael
Degiovanni, Renzo
Zhang, Jie M.
Harman, Mark
Papadakis, Mike
author_facet Konstantinou, Michael
Degiovanni, Renzo
Zhang, Jie M.
Harman, Mark
Papadakis, Mike
contents Recent advances in automated test generation utilises language models to produce unit tests. While effective, language models tend to generate many incorrect tests with respect to both syntax and semantics. Although such incorrect tests can be easily detected and discarded, they constitute a "missed opportunity" -- if fixed, they are often valuable as they directly add testing value (they effectively target the underlying program logic to be tested) and indirectly form good seeds for generating additional tests. To this end, we propose a simple technique for repairing some of these incorrect tests through a combination of rule-based static analysis and re-prompting. We evaluate this simple approach, named YATE, on a set of 6 open-source projects and show that it can effectively produce tests that cover on average 32.06% more lines and kill 21.77% more mutants than a plain LLM-based method. We also compare YATE with four other LLM-based methods, namely HITS, SYMPROMPT, TESTSPARK and COVERUP and show that it produces tests that cover substantially more code. YATE achieves 22% higher line coverage, 20% higher branch coverage and kill 20% more mutants at a comparable cost (number of calls to LLMs).
format Preprint
id arxiv_https___arxiv_org_abs_2507_18316
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle YATE: The Role of Test Repair in LLM-Based Unit Test Generation
Konstantinou, Michael
Degiovanni, Renzo
Zhang, Jie M.
Harman, Mark
Papadakis, Mike
Software Engineering
Recent advances in automated test generation utilises language models to produce unit tests. While effective, language models tend to generate many incorrect tests with respect to both syntax and semantics. Although such incorrect tests can be easily detected and discarded, they constitute a "missed opportunity" -- if fixed, they are often valuable as they directly add testing value (they effectively target the underlying program logic to be tested) and indirectly form good seeds for generating additional tests. To this end, we propose a simple technique for repairing some of these incorrect tests through a combination of rule-based static analysis and re-prompting. We evaluate this simple approach, named YATE, on a set of 6 open-source projects and show that it can effectively produce tests that cover on average 32.06% more lines and kill 21.77% more mutants than a plain LLM-based method. We also compare YATE with four other LLM-based methods, namely HITS, SYMPROMPT, TESTSPARK and COVERUP and show that it produces tests that cover substantially more code. YATE achieves 22% higher line coverage, 20% higher branch coverage and kill 20% more mutants at a comparable cost (number of calls to LLMs).
title YATE: The Role of Test Repair in LLM-Based Unit Test Generation
topic Software Engineering
url https://arxiv.org/abs/2507.18316