GUIDER: GUI structure and vision co-guided test script repair for Android apps

GUI testing is an essential part of regression testing for Android apps. For regression GUI testing to remain effective, it is important that obsolete GUI test scripts get repaired after the app has evolved. In this paper, we propose a novel approach named GUIDER to automated repair of GUI test scripts for Android apps. The key novelty of the approach lies in the utilization of both structural and visual information of widgets on app GUIs to better understand what widgets of the base version app become in the updated version. A supporting tool has been implemented for the approach. Experiments conducted on the popular messaging and social media app WeChat show that GUIDER is both effective and efficient. Repairs produced by GUIDER enabled 88.8% and 54.9% more test actions to run correctly than those produced by existing approaches to GUI test repair that rely solely on visual or structural information of app GUIs.

[1]  Mauro Pezzè,et al.  Automated GUI refactoring and test script repair , 2011, ETSE '11.

[2]  Atif M. Memon,et al.  An event‐flow model of GUI‐based applications for testing , 2007, Softw. Test. Verification Reliab..

[3]  Atif M. Memon An event-flow model of GUI-based applications for testing: Research Articles , 2007 .

[4]  G LoweDavid,et al.  Distinctive Image Features from Scale-Invariant Keypoints , 2004 .

[5]  Myra B. Cohen,et al.  Repairing GUI Test Suites Using a Genetic Algorithm , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

[6]  Xuandong Li,et al.  Change-Based Test Script Maintenance for Android Apps , 2018, 2018 IEEE International Conference on Software Quality, Reliability and Security (QRS).

[7]  Gregg Rothermel,et al.  Comparing model-based and dynamic event-extraction based GUI testing techniques: An empirical study , 2014, J. Syst. Softw..

[8]  Arun Prakash Agarwal,et al.  An automated tool for regression testing in web applications , 2013, SOEN.

[9]  Darko Marinov,et al.  ReAssert: Suggesting Repairs for Broken Unit Tests , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[10]  Alessandro Orso,et al.  WATER: Web Application TEst Repair , 2011, ETSE '11.

[11]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[12]  Chen Fu,et al.  Inferring Types of References to GUI Objects in Test Scripts , 2009, 2009 International Conference on Software Testing Verification and Validation.

[13]  Xiao Li,et al.  ATOM: Automatic Maintenance of GUI Test Scripts for Evolving Mobile Applications , 2017, 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST).

[14]  Tian Zhang,et al.  GUI-Guided Test Script Repair for Mobile Apps , 2022, IEEE Transactions on Software Engineering.

[15]  RothermelGregg,et al.  Comparing model-based and dynamic event-extraction based GUI testing techniques , 2014 .

[16]  Mary Lou Soffa,et al.  Regression testing of GUIs , 2003, ESEC/FSE-11.

[17]  Zhenyu Chen,et al.  SITAR: GUI Test Script Repair , 2016, IEEE Transactions on Software Engineering.

[18]  Darko Marinov,et al.  On test repair using symbolic execution , 2010, ISSTA '10.

[19]  Sarfraz Khurshid,et al.  Specification-Based Test Repair Using a Lightweight Formal Method , 2012, FM.

[20]  David G. Lowe,et al.  Object recognition from local scale-invariant features , 1999, Proceedings of the Seventh IEEE International Conference on Computer Vision.

[21]  Arie van Deursen,et al.  Refactoring test code , 2001 .

[22]  Chen Fu,et al.  Maintaining and evolving GUI-directed test scripts , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[23]  Gregg Rothermel,et al.  WATERFALL: an incremental approach for repairing record-replay tests of web applications , 2016, SIGSOFT FSE.

[24]  Ali Mesbah,et al.  Visual web test repair , 2018, ESEC/SIGSOFT FSE.

[25]  Michael D. Ernst,et al.  Automatically repairing broken workflows for evolving GUI applications , 2013, ISSTA.

[26]  Filippo Ricca,et al.  Comparing the maintainability of selenium WebDriver test suites employing different locators: a case study , 2013, JAMAICA 2013.