SITAR: GUI Test Script Repair

System testing of a GUI-based application requires that test cases, consisting of sequences of user actions/events, be executed and the software's output be verified. To enable automated re-testing, such test cases are increasingly being coded as low-level test scripts, to be replayed automatically using test harnesses. Whenever the GUI changes-widgets get moved around, windows get merged-some scripts become unusable because they no longer encode valid input sequences. Moreover, because the software's output may have changed, their test oracles-assertions and checkpoints-encoded in the scripts may no longer correctly check the intended GUI objects. We present ScrIpT repAireR (SITAR), a technique to automatically repair unusable low-level test scripts. SITAR uses reverse engineering techniques to create an abstract test for each script, maps it to an annotated event-flow graph (EFG), uses repairing transformations and human input to repair the test, and synthesizes a new “repaired” test script. During this process, SITAR also repairs the reference to the GUI objects used in the checkpoints yielding a final test script that can be executed automatically to validate the revised software. SITAR amortizes the cost of human intervention across multiple scripts by accumulating the human knowledge as annotations on the EFG. An experiment using QTP test scripts suggests that SITAR is effective in that 41-89 percent unusable test scripts were repaired. Annotations significantly reduced human cost after 20 percent test scripts had been repaired.

[1]  Atif M. Memon,et al.  GUI ripping: reverse engineering of graphical user interfaces for testing , 2003, 10th Working Conference on Reverse Engineering, 2003. WCRE 2003. Proceedings..

[2]  Atif M. Memon,et al.  Definition and evaluation of mutation operators for GUI-level mutation analysis , 2015, 2015 IEEE Eighth International Conference on Software Testing, Verification and Validation Workshops (ICSTW).

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

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

[5]  Alberto Savoia,et al.  Differential testing: a new approach to change detection , 2007, ESEC-FSE '07.

[6]  Mika Katara,et al.  Model-Based Testing Through a GUI , 2005, FATES.

[7]  Tarun Lalwani QuickTest Professional Unplugged: 2nd Edition , 2011 .

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

[9]  Alessandro Orso,et al.  Understanding myths and realities of test-suite evolution , 2012, SIGSOFT FSE.

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

[11]  Atif M. Memon,et al.  Using transient/persistent errors to develop automated test oracles for event-driven software , 2004, Proceedings. 19th International Conference on Automated Software Engineering, 2004..

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

[13]  Atif M. Memon,et al.  Automatically repairing event sequence-based GUI test suites for regression testing , 2008, TSEM.

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

[15]  Mauro Pezzè,et al.  Supporting Test Suite Evolution through Test Case Adaptation , 2012, 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation.

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

[17]  Zhenyu Chen,et al.  GUI testing assisted by human knowledge: Random vs. functional , 2014, J. Syst. Softw..

[18]  Tao Xie,et al.  Augmenting Automatically Generated Unit-Test Suites with Regression Oracle Checking , 2006, ECOOP.

[19]  Mark Harman,et al.  Automated Session Data Repair for Web Application Regression Testing , 2008, 2008 1st International Conference on Software Testing, Verification, and Validation.

[20]  Atif M. Memon,et al.  Designing and comparing automated test oracles for GUI-based software applications , 2007, TSEM.

[21]  Mary Lou Soffa,et al.  Coverage criteria for GUI testing , 2001, ESEC/FSE-9.

[22]  Claire Le Goues,et al.  GenProg: A Generic Method for Automatic Software Repair , 2012, IEEE Transactions on Software Engineering.

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

[24]  Atif M. Memon,et al.  Conceptualization and Evaluation of Component-Based Testing Unified with Visual GUI Testing: An Empirical Study , 2015, 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST).

[25]  Mehdi MirzaAghaei,et al.  Automatic test suite evolution , 2011, ESEC/FSE '11.

[26]  Mauro Pezzè,et al.  Automatically repairing test cases for evolving method declarations , 2010, 2010 IEEE International Conference on Software Maintenance.

[27]  Tao Xie,et al.  Automated detection of api refactorings in libraries , 2007, ASE '07.

[28]  Atif M. Memon,et al.  An Observe-Model-Exercise* Paradigm to Test Event-Driven Systems with Undetermined Input Spaces , 2014, IEEE Transactions on Software Engineering.

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

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

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