Busca avançada
Ano de início
Entree


An initial investigation of ChatGPT unit test generation capability

Texto completo
Autor(es):
Guilherme, Vitor H. ; Vincenzi, Auri M. R.
Número total de Autores: 2
Tipo de documento: Artigo Científico
Fonte: PROCEEDINGS OF THE 8TH BRAZILIAN SYMPOSIUM ON SYSTEMATIC AND AUTOMATED SOFT-WARE TESTING, SAST 2023; v. N/A, p. 10-pg., 2023-01-01.
Resumo

Context: Software testing ensures software quality, but developers often disregard it. The use of automated testing generation is pursued to reduce the consequences of overlooked test cases in a software project. Problem: In the context of Java programs, several tools can completely automate generating unit test sets. Additionally, studies are conducted to offer evidence regarding the quality of the generated test sets. However, it is worth noting that these tools rely on machine learning and other AI algorithms rather than incorporating the latest advancements in Large Language Models (LLMs). Solution: This work aims to evaluate the quality of Java unit tests generated by an OpenAI LLM algorithm, using metrics like code coverage and mutation test score. Method: For this study, 33 programs used by other researchers in the field of automated test generation were selected. This approach was employed to establish a baseline for comparison purposes. For each program, 33 unit test sets were generated automatically, without human interference, by changing Open AI API parameters. After executing each test set, metrics such as code line coverage, mutation score, and success rate of test execution were collected to evaluate the efficiency and effectiveness of each set. Summary of Results: Our findings revealed that the OpenAI LLM test set demonstrated similar performance across all evaluated aspects compared to traditional automated Java test generation tools used in the previous research. These results are particularly remarkable considering the simplicity of the experiment and the fact that the generated test code did not undergo human analysis. (AU)

Processo FAPESP: 19/23160-0 - Teste de software baseado em mutação com alta eficácia e baixa dívida técnica: processo automatizado e protótipo de ambiente de apoio livres
Beneficiário:Auri Marcelo Rizzo Vincenzi
Modalidade de apoio: Auxílio à Pesquisa - Regular