Automazione del Test-Driven Development tramite Large Language Models: sviluppo e sperimentazione
View/ Open
Author
Zecca, Carlo Arturo <2002>
Date
2026-02-19Data available
2026-02-26Abstract
La crescente diffusione dei Large Language Models (LLM) nello sviluppo software sta portando ad un cambiamento radicale del ruolo dello sviluppatore, spostando il focus dalla scrittura manuale del codice all'orchestrazione, definizione del problema e valutazione delle soluzioni. Il presente lavoro documenta lo sviluppo di un tool progettato per l'automazione del Test-Driven Development (TDD) per la generazione di interi sistemi software a livello di business logic, con l'obiettivo principale di valutare la fattibilità dell'automazione del TDD tramite LLM e di analizzare i risultati ottenuti, al fine di analizzarne l'efficacia e lo scostamento rispetto a progetti sviluppati manualmente.
L'architettura del sistema progettato è costituito da agenti LLM autonomi che applicano iterativamente le fasi di testing, coding e refactoring corrispondenti alle fasi del TDD, partendo da una descrizione dei requisiti funzionali per i metodi da generare.
Per valutare l'efficacia del tool, è stata condotta un'analisi comparativa tra sette progetti disponibili su GitHub di riferimento con complessità differenti e i corrispondenti progetti generati automaticamente. L'analisi basata sui risultati ottenuti tramite gli strumenti DesigniteJava e PIT, è composta da una valutazione della qualità dei test, misurata attraverso le metriche di test strength e statement coverage, ed una valutazione della qualità del codice, analizzata tramite la distribuzione della complessità ciclomatica e la densità di code smell. I risultati mostrano che i progetti generati automaticamente raggiungono livelli di qualità simili ai progetti di riferimento, con differenze riscontrate riguardanti la struttura del codice sorgente. The growing spread of Large Language Models (LLM) in software development is bringing a drastic change to the developer role, shifting the focus from manual code writing to the design and supervision of the development process. This work documents the development of a tool designed for the automation of Test-Driven Development (TDD) to generate entire software systems at the business logic level. The goal is to evaluate the feasability of automating TDD through LLMs and to analyze its results to assess their effectiveness and deviation compared to manually developed projects.
The system architecture is composed of autonomous LLM agents that, guided by the functional requirements of the methods to be generated, execute iterative testing, coding and refactoring steps. These phases correspond to the TDD cycle.
To evaluate the tool's effectiveness, a comparative analysis was conducted between seven reference projects of varying complexity available on GitHub and their generated counterparts. The analysis, based on the results obtained using DesigniteJava and PIT, consists of an assessment of test quality, measured through test strength and statement coverage, and an evaluation of code quality, analyzed via cyclomatic complexity distribution and the code smell density. The results demonstrate that the automatically generated projects achieve quality levels comparable to the reference projects, with observed differences concerning the source code structure.
Type
info:eu-repo/semantics/bachelorThesisCollections
- Laurea Triennale [4361]

