Test Quest: Migliorare i test Selenium attraverso la gamification e gli LLM in IntelliJ IDEA
View/ Open
Author
Talgatkyzy, Arailym <2002>
Date
2026-10-14Data available
2026-10-22Abstract
I test Web end-to-end richiedono una manutenzione regolare. I tester devono individuare locator fragili, aggiungere scenari mancanti e assicurarsi che le asserzioni verifichino correttamente il comportamento atteso. Indicazioni generiche, come “utilizzare locator più robusti”, non specificano quale modifica debba essere apportata in un determinato progetto né quando tale modifica possa essere considerata completata.
Questa tesi presenta Test Quest, un plugin per IntelliJ IDEA che trasforma i test Java/Selenium esistenti e le pagine acquisite durante l’esecuzione dei test in piccoli compiti di miglioramento, denominati quest. Ogni quest identifica un test di riferimento, descrive la modifica attesa, elenca i criteri di accettazione e indica un livello di difficoltà e una ricompensa in punti esperienza.
Un Large Language Model (Gemini) genera le quest sulla base di una porzione limitata del progetto. Il plugin stesso controlla quindi ogni quest proposta e, successivamente, determina se l’utente l’ha completata applicando regole predefinite al codice sorgente e alle pagine acquisite, oltre a eseguire il metodo di test interessato. Il modello linguistico non assegna mai punti esperienza e una quest completata non può essere premiata più di una volta. Questi controlli confermano che sia stato effettuato il tipo di modifica richiesto e che il test venga eseguito con successo; non dimostrano, tuttavia, che la modifica costituisca un miglioramento significativo.
Il prototipo è stato valutato su due applicazioni del benchmark BEWT, Kanboard ed ExpressCart. In uno studio pilota controbilanciato con disegno within-subject, tutti e quattro i partecipanti hanno riferito che Test Quest rendeva i compiti più chiari e più interessanti rispetto ai normali compiti scritti, mentre le loro risposte relative all’efficienza percepita, alla fiducia, alla perseveranza e alla preferenza futura sono risultate eterogenee; il completamento dei compiti, la correttezza e il tempo impiegato no End-to-end Web tests need regular maintenance. Testers have to find fragile locators, add
missing scenarios, and make assertions check the right behavior. General advice such as “use
more robust locators” does not say which change to make in a given project or when the
change is finished. This thesis presents Test Quest, an IntelliJ IDEA plugin that turns existing
Java/Selenium tests and pages captured while the tests run into small improvement tasks
called quests. Each quest names a target test, describes the expected change, lists acceptance
criteria, and shows a difficulty level and a reward in experience points. A large language model
(Gemini) writes the quests from a limited part of the project. The plugin itself then checks
each proposed quest, and later decides whether the user has completed it by applying fixed
source-code and page rules and by running the target test method. The language model never
awards experience points, and a completed quest cannot be rewarded twice. These checks
confirm that the requested kind of change was made and that the test passes; they do not
prove that the change is a meaningful improvement.
The prototype was evaluated on two applications from the BEWT benchmark, Kanboard and
ExpressCart. In a counterbalanced within-subject pilot, all four participants reported that
Test Quest made the tasks clearer and more interesting than ordinary written tasks, while
their answers about perceived efficiency, confidence, persistence, and future preference were
mixed; task completion, correctness, and time were not measured. In a frozen generation run,
all five requests returned a valid set of three quests, and all 15 quests were grounded in the
project; the author rated 10 and an independent reviewer 11 of them as usable, with most
problems caused by tests that depend on data created by other tests. In nine prepared verifier
cases, run by both reviewers, points were awarded for every correct implementation and for no
incorrect one, although
Type
info:eu-repo/semantics/masterThesisCollections
- Laurea Magistrale [8404]

