Ranking approaches for similarity-based web element location
Artikel i vetenskaplig tidskrift, 2025

Context: GUI-based tests for web applications are frequently broken by fragility, i.e. regression tests fail due to changing properties of the web elements. The most influential factor for fragility are the locators used in the scripts, i.e. the means of identifying the elements of the GUI. Objective: We extend a state-of-the-art Multi-Locator solution that considers 14 locators from the DOM model of a web application, and identifies overlapping nodes in the DOM tree (VON-Similo). We augment the approach with standard Machine Learning and Learning to Rank (LTR) approaches to aid the location of web elements. Method: We document an experiment with a ground truth of 1163 web element pairs, taken from different releases of 40 web applications, to compare the robustness of the algorithms to locator weight change, and the performance of LTR approaches in terms of MeanRank and PctAtN. Results: Using LTR algorithms, we obtain a maximum probability of finding the correct target at the first position of 88.4% (lowest 82.57%), and among the first three positions of 94.79% (lowest 91.86%). The best mean rank of the correct candidate is 1.57. Conclusion: The similarity-based approach proved to be highly dependable in the context of web application testing, where a low percentage of matching errors can still be accepted.

GUI testing

Web element locators

Test automation

XPath locators

Test case robustness

Författare

Riccardo Coppola

Politecnico di Torino

Robert Feldt

Chalmers, Data- och informationsteknik, Software Engineering

Michel Nass

Blekinge Tekniska Högskola, BTH

Emil Alégroth

Blekinge Tekniska Högskola, BTH

Journal of Systems and Software

0164-1212 (ISSN)

Vol. 222 112286

Informationsteori för programvarutestning

Vetenskapsrådet (VR) (2015-04913), 2016-01-01 -- 2019-12-31.

Ämneskategorier

Programvaruteknik

DOI

10.1016/j.jss.2024.112286

Mer information

Senast uppdaterat

2024-12-13