Context: GUI Test suites suffer from high fragility, in fact modifications or redesigns of the user interface are commonly frequent and often invalidate the tests. This leads, for both DOM- and visual-based techniques, to frequent need for careful maintenance of test suites, which can be expensive and time-consuming. Objective: The goal of this work is to present a set of guidelines to write cleaner and more robust test code, reducing the cost of maintenance and producing more understandable code. Based on the provided recommendations, a static test suite analyzer and code linter has been developed. Method: An ad-hoc grey literature research was conducted on the state of the practice, by performing a semi-systematic literature review. Authors’ experience was coded into a set of recommendations, by applying the grounded theory methodology. Based on these results, we developed a linter in the form of a plugin for Visual Studio Code, implementing 17 of the provided guidelines. The plugin highlights test smells in the Java and Javascript languages. Finally, we conducted a preliminary validation of the tool against test suites from real GitHub projects. Conclusions: The preliminary evaluation, meant to be an attempt of application of the plugin to real test suites, detected three main smells, namely the usage of global variables, the lack of adoption of the Page Object design pattern, and the usage of fragile locator such as the XPath.

Guidelines for GUI Testing Maintenance: A Linter for Test Smell Detection / Fulcini, Tommaso; Garaccione, Giacomo; Coppola, Riccardo; Ardito, Luca; Torchiano, Marco. - ELETTRONICO. - (2022), pp. 17-24. (Intervento presentato al convegno A-TEST 2022: 13th Workshop on Automating Test Case Design, Selection and Evaluation tenutosi a Singapore nel November 17-18, 2022) [10.1145/3548659.3561306].

Guidelines for GUI Testing Maintenance: A Linter for Test Smell Detection

tommaso fulcini;giacomo garaccione;riccardo coppola;luca ardito;marco torchiano
2022

Abstract

Context: GUI Test suites suffer from high fragility, in fact modifications or redesigns of the user interface are commonly frequent and often invalidate the tests. This leads, for both DOM- and visual-based techniques, to frequent need for careful maintenance of test suites, which can be expensive and time-consuming. Objective: The goal of this work is to present a set of guidelines to write cleaner and more robust test code, reducing the cost of maintenance and producing more understandable code. Based on the provided recommendations, a static test suite analyzer and code linter has been developed. Method: An ad-hoc grey literature research was conducted on the state of the practice, by performing a semi-systematic literature review. Authors’ experience was coded into a set of recommendations, by applying the grounded theory methodology. Based on these results, we developed a linter in the form of a plugin for Visual Studio Code, implementing 17 of the provided guidelines. The plugin highlights test smells in the Java and Javascript languages. Finally, we conducted a preliminary validation of the tool against test suites from real GitHub projects. Conclusions: The preliminary evaluation, meant to be an attempt of application of the plugin to real test suites, detected three main smells, namely the usage of global variables, the lack of adoption of the Page Object design pattern, and the usage of fragile locator such as the XPath.
File in questo prodotto:
File Dimensione Formato  
A-test.pdf

accesso aperto

Descrizione: manoscritto accettato, in attesa di pubblicazione
Tipologia: 2. Post-print / Author's Accepted Manuscript
Licenza: PUBBLICO - Tutti i diritti riservati
Dimensione 533.06 kB
Formato Adobe PDF
533.06 kB Adobe PDF Visualizza/Apri
3548659.3561306.pdf

non disponibili

Tipologia: 2a Post-print versione editoriale / Version of Record
Licenza: Non Pubblico - Accesso privato/ristretto
Dimensione 661.82 kB
Formato Adobe PDF
661.82 kB Adobe PDF   Visualizza/Apri   Richiedi una copia
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11583/2971256