LLMs for Automated Unit Test Generation and Assessment in Java: The AgoneTest Framework
Lops, Andrea, Narducci, Fedelucio, Ragone, Azzurra, Trizio, Michelantonio, Bartolini, Claudio
–arXiv.org Artificial Intelligence
Unit testing is an essential but resource-intensive step in software development, ensuring individual code units function correctly. This paper introduces AgoneTest, an automated evaluation framework for Large Language Model-generated (LLM) unit tests in Java. AgoneTest does not aim to propose a novel test generation algorithm; rather, it supports researchers and developers in comparing different LLMs and prompting strategies through a standardized end-to-end evaluation pipeline under realistic conditions. We introduce the Classes2Test dataset, which maps Java classes under test to their corresponding test classes, and a framework that integrates advanced evaluation metrics, such as mutation score and test smells, for a comprehensive assessment. Experimental results show that, for the subset of tests that compile, LLM-generated tests can match or exceed human-written tests in terms of coverage and defect detection. Our findings also demonstrate that enhanced prompting strategies contribute to test quality. AgoneTest clarifies the potential of LLMs in software testing and offers insights for future improvements in model design, prompt engineering, and testing practices.
arXiv.org Artificial Intelligence
Nov-27-2025
- Country:
- Asia
- Middle East > Iran (0.04)
- Singapore (0.04)
- Europe
- Greece (0.04)
- Hungary > Csongrád-Csanád County
- Szeged (0.04)
- Italy
- Middle East
- Cyprus > Ammochostos
- Famagusta (0.04)
- Northern Cyprus (0.04)
- Cyprus > Ammochostos
- Portugal > Lisbon
- Lisbon (0.04)
- Slovakia > Bratislava
- Bratislava (0.04)
- Sweden > Vaestra Goetaland
- Gothenburg (0.04)
- North America
- Canada > Ontario (0.04)
- United States
- California > Santa Clara County
- San Jose (0.04)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- Massachusetts > Suffolk County
- Boston (0.04)
- Minnesota > Hennepin County
- Minneapolis (0.14)
- Nebraska > Lancaster County
- Lincoln (0.04)
- Washington > King County
- Seattle (0.04)
- California > Santa Clara County
- Oceania > Australia
- South America > Brazil
- Mato Grosso do Sul > Campo Grande (0.04)
- Asia
- Genre:
- Research Report > New Finding (1.00)
- Technology: