polito.it
Politecnico di Torino (logo)

Adaptive GUI test evolution and oracle maintenance in Android

Alessandro Fedriga

Adaptive GUI test evolution and oracle maintenance in Android.

Rel. Riccardo Coppola, Tommaso Fulcini. Politecnico di Torino, Corso di laurea magistrale in Ingegneria Informatica (Computer Engineering), 2025

[img] PDF (Tesi_di_laurea) - Tesi
Licenza: Creative Commons Attribution Non-commercial No Derivatives.

Download (2MB)
Abstract:

Automated GUI testing is essential in contemporary Android development, yet it is notoriously fragile, particularly when utilizing dynamic frameworks like Jetpack Compose. Even minor changes to the UI frequently cause test failures, resulting in continuous integration pipelines being overwhelmed with false positives and developers facing expensive maintenance efforts. This thesis introduces a developer-in-the-loop approach leveraging Large Language Models (LLMs)—specifically GitHub Copilot combined with Claude 3.7 Sonnet—as a zero-shot test repair agent embedded within Android Studio. By examining IDE context, this strategy effectively repairs broken selectors, modifies test oracles, and preserves test logic after GUI modifications. An empirical assessment of this technique was conducted on the Bitwarden for Android mobile application, an open-source project with 1083 GUI tests. The analysis covered two recent versions of the application, identifying test failures and applying the LLM to address these issues. The study investigates test fragility (RQ1), the effectiveness of zero-shot LLM-based repairs (RQ2), additional benefits from retrying prompts (RQ3), and improvements resulting from brief developer interactions (RQ4). Findings demonstrate that a single zero-shot prompt can restore a notable number of failing tests, greatly decreasing manual repair efforts. Additional prompt retries yielded marginal further improvements, whereas limited developer intervention significantly boosted recovery effectiveness. These results highlight that incorporating LLM-driven methods substantially reduces the maintenance workload associated with GUI test suites, improving resilience to frequent UI changes in Jetpack Compose applications. Subsequent research will continue refining LLM integration and examining its broader practical applications.

Relatori: Riccardo Coppola, Tommaso Fulcini
Anno accademico: 2024/25
Tipo di pubblicazione: Elettronica
Numero di pagine: 49
Soggetti:
Corso di laurea: Corso di laurea magistrale in Ingegneria Informatica (Computer Engineering)
Classe di laurea: Nuovo ordinamento > Laurea magistrale > LM-32 - INGEGNERIA INFORMATICA
Aziende collaboratrici: NON SPECIFICATO
URI: http://webthesis.biblio.polito.it/id/eprint/36433
Modifica (riservato agli operatori) Modifica (riservato agli operatori)