Politecnico di Torino (logo)

Implementation of an automated repairing mechanism for GUI test scripts for mobile applications

Marilyn Fulgione

Implementation of an automated repairing mechanism for GUI test scripts for mobile applications.

Rel. Luca Ardito, Maurizio Morisio. Politecnico di Torino, Corso di laurea magistrale in Ingegneria Informatica (Computer Engineering), 2020

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

Download (3MB) | Preview

Context: In the field of Mobile Application Development, testing practices can be very expensive and time-consuming - especially in an industrial setting. One of the main causes of this phenomenon is the constant evolution of the GUIs aspect, leading to frequent breakages of layout-based test cases. Goal: The aim of this thesis’ work is building a tool that repairs layout-based test cases that break in the transition from an application release to the immediately following one. In particular, the tool tries to find in the newer release the widget that is most similar to the one the test located in the previous release, and it consequently replaces the related method calls. Method: The tool works on Android applications developed in Java and it focuses on repairing Espresso test cases containing calls to some methods of the ViewMatchers class. The most similar widget in the newer release has been selected as the one with the highest matching rate with the one located in the previous version of the app. This value was computed considering the most characterizing attributes of the View class and of some of its subclasses, and assigning a weight to each of them based on how much that attribute is prone to changes in the evolution of Android applications layouts. If the matching rate is equal or above 65%, the widget is considered equivalent to the one located in the previous version and the user is asked whether they want to proceed with the test class refactoring using that widget attribute values. Results: We tested our tool on three different applications and a total of 30 test cases, including 40 different method calls. The tool succeeded in repairing 80% of them with the truly equivalent widget of the newer version of the app. Conclusions: The tool proved to be successful to fulfill the goal it was developed for. It can also be easily extended to Kotlin based applications and other test tools, to enlarge its field of applicability. Few changes could be made with regards to the precision of the computation of the matching rate between widgets – mainly considering a larger set of widget attributes.

Relators: Luca Ardito, Maurizio Morisio
Academic year: 2019/20
Publication type: Electronic
Number of Pages: 76
Corso di laurea: Corso di laurea magistrale in Ingegneria Informatica (Computer Engineering)
Classe di laurea: New organization > Master science > LM-32 - COMPUTER SYSTEMS ENGINEERING
Aziende collaboratrici: UNSPECIFIED
URI: http://webthesis.biblio.polito.it/id/eprint/14470
Modify record (reserved for operators) Modify record (reserved for operators)