Estudo do desempenho de LLMs como geradores automáticos de teste unitário para programas Python
Loading...
Date
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Universidade Federal de São Carlos
DOI
Abstract
Software testing is a fundamental stage in system development, essential for detecting faults and ensuring the quality of the final product, yet it remains challenging for dynamically typed languages such as Python. This study examines the ability of the ChatGPT-3.5-turbo language model to generate test sets for Python programs, comparing its performance with tools such as Pynguin and with existing test suites. For this evaluation, 40 Python programs were used, from which Pytest-compliant tests were generated through the OpenAI API under varying temperature settings. The tests were validated using Pytest, and coverage and mutation scores were obtained with Coverage, MutPy, and Cosmic-Ray. The results show that ChatGPT-3.5-turbo produces valid tests for simple programs but maintains an overall average below 28%, despite its low computational cost. Higher temperatures improve performance, and combining tests generated at different temperatures increases diversity, allowing the model to outperform both Pynguin and existing test suites in decision coverage and mutation score.
Description
Citation
GUERINO, Lucca Renato. Estudo do desempenho de LLMs como geradores automáticos de teste unitário para programas Python. 2025. Trabalho de Conclusão de Curso (Graduação em Engenharia de Computação) – Universidade Federal de São Carlos, São Carlos, 2025. Disponível em: https://repositorio.ufscar.br/handle/20.500.14289/23337.
Collections
Endorsement
Review
Supplemented By
Referenced By
Creative Commons license
Except where otherwise noted, this item's license is described as Attribution-NoDerivs 3.0 Brazil
