arrow
Return

Automated Test Generation Using Large Language Models

delete2025-09-30
delete0
delete
OA
AI
M
Marcin Andrzejewski
N
Nina Dubicka
J
Jędrzej Podolak
M
Marek Kowal
J
Jakub Siłka *
DOI:10.3390/data10100156delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
This study explores the potential of generative AI, specifically Large Language Models (LLMs), in automating unit test generation in Python 3.13. We analyze tests, both those created by programmers and those generated by LLM models, for fifty source code cases. Our main focus is on how the choice of model, the difficulty of the source code, and the prompting strategy influence the quality of the generated tests. The results show that AI models can help automate test creation for simple code, but their effectiveness decreases for more complex tasks. We introduce an embedding-based similarity analysis to assess how closely AI-generated tests resemble human-written ones, revealing that AI outputs often lack semantic diversity. The study also highlights the potential of AI models for rapid test prototyping, which can significantly speed up the software development cycle. However, further customization and training of the models on specific use cases is needed to achieve greater precision. Our findings provide practical insights into integrating LLMs into software testing workflows and emphasize the importance of prompt design and model selection.
Keywords:
GenAI
TDD
embeddings
code coverage
LLM
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

D
Data
IF:
2
Papers:
194
Citations:
2.1K

Organization

S
Silesian University of Technology
Scholars:
6.2K
Papers: 6.2K
Citations: 5.9K
Cited Papers

Cited Papers

Software Testing With Large Language Models: Survey, Landscape, and Vision
err2024-04-01
err31
errOAAI
errWang, Junjie; Huang, Yuchao; Chen, Chunyang; Liu, Zhe; Wang, Song; Wang, Qing
errShare
errSave
errShare
errSave
Role play with large language models
err2023-11-08
err0
errOAAI
errMurray Shanahan; Kyle McDonell; Laria Reynolds
errShare
errSave
Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Models
err2022-01-01
err0
errOAAI
errRobert Logan IV; Ivana Balazevic; Eric Wallace; Fabio Petroni; Sameer Singh; Sebastian Riedel
errShare
errSave
researcher View more