The design and implementation of unit tests is a complex task that many programmers neglect. This research evaluates the potential of Large Language Models (LLMs) in automatically generating test cases, comparing them with manual tests. An optimized prompt was developed, that integrates code and requirements, covering critical cases such as equivalence partitions and boundary values. The strengths and weaknesses of LLMs versus trained programmers were compared through quantitative metrics and manual qualitative analysis. The results show that the effectiveness of LLMs depends on well-designed prompts, robust implementation, and precise requirements. Although flexible and promising, LLMs still require human supervision. This work highlights the importance of manual qualitative analysis as an essential complement to automation in unit test evaluation.
@inproceedings{10.1007/978-3-032-06336-6_4,
doi = {},
isbn = {978-3-032-06336-6},
note = {},
year = {2025},
month = {},
pages = {46--60},
title = {Evaluating Large Language Models for the Generation of Unit Tests with Equivalence Partitions and Boundary Values},
author = {RodrÃguez, MartÃn and Rossi, Gustavo and Fernandez, Alejandro},
editor = {Naiouf, Marcelo and De Giusti, Laura and Chichizola, Franco and Libutti, Leandro},
address = {Cham},
ranking = {},
abstract = {The design and implementation of unit tests is a complex task that many programmers neglect. This research evaluates the potential of Large Language Models (LLMs) in automatically generating test cases, comparing them with manual tests. An optimized prompt was developed, that integrates code and requirements, covering critical cases such as equivalence partitions and boundary values. The strengths and weaknesses of LLMs versus trained programmers were compared through quantitative metrics and manual qualitative analysis. The results show that the effectiveness of LLMs depends on well-designed prompts, robust implementation, and precise requirements. Although flexible and promising, LLMs still require human supervision. This work highlights the importance of manual qualitative analysis as an essential complement to automation in unit test evaluation.},
booktitle = {Cloud Computing, Big Data and Emerging Topics},
publisher = {Springer Nature Switzerland},
organization = {},
}Read or download the open-access publication manuscript directly.