ExtRep: a GUI test repair method for mobile applications based on test-extension
摘要
GUI testing ensures the software quality and user experience in the ever-changing mobile application development. Using test scripts is one of the main GUI testing manner, but it might be obsolete when the GUI changes with the app’s evolution. Current studies often rely on textual or visual similarity to perform test repair, but may be less effective when the interacted event sequence changes dramatically. In the interaction design, practitioners often provide multiple entry points to access the same function to gain higher openness and flexibility, which indicates that there may be multiple routes for reference in test repair. To evaluate the feasibility, we first conducted an exploratory study on 37 tests from 18 apps. The result showed that over 81% tests could be represented with alternative event paths, and using the extended paths could help enhance the test replay rate. Based on this finding, we propose a test-extension-based test repair algorithm named ExtRep. The method first uses test-extension to find alternative paths with similar test objectives based on feature coverage, and then finds repaired result with the help of sequence transduction probability proposed in NLP area. Experiments conducted on 40 popular applications demonstrate that ExtRep can achieve a success rate of 73.68% in repairing 97 tests, which significantly outperforms current approaches Water, Meter, and Guider. Moreover, the test-extension approach displays immense potential for optimizing test repairs. A tool that implements the ExtRep is available for practical use and future research.