AutoInSpec: Using Missing Test Coverage to Improve Specifications in GUIs

Developers of a software's graphical user interface (GUI) often fail to document the interface specifications. Without these, models used for automated test generation and execution remain imperfect and incomplete. This leads to unexpected behavior that creates unrecoverable situations for test harnesses, and missed coverage. In this paper, we present AutoInSpec, a technique to infer an important class of specifications, temporal and state-based invariants between GUI events that have been incorrectly modeled. Unlike existing specification mining approaches that require full execution traces, or source code, and that mine all invariants, we simplify the problem. We guide AutoInSpec with coverage criteria and use a previously developed repair framework that builds coverage-adequate test suites, removing unexecutable sub-sequences from consideration. These failing sub-sequences are input to a logic-based inference engine, armed with known invariant templates, to obtain the missing specifications. We validate AutoInSpec on a set of well studied GUI applications.

[1]  David Lo,et al.  Scenario-based and value-based specification mining: better together , 2010, Automated Software Engineering.

[2]  Suresh Jagannathan,et al.  Path-Sensitive Inference of Function Precedence Protocols , 2007, 29th International Conference on Software Engineering (ICSE'07).

[3]  Lee J. White,et al.  Event-based modelling, analysis and testing of user interactions: approach and case study: Research Articles , 2006 .

[4]  Leonardo Mariani,et al.  Automatic generation of software behavioral models , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[5]  Zhendong Su,et al.  Symbolic mining of temporal specifications , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[6]  Yuriy Brun,et al.  Using dynamic execution traces and program invariants to enhance behavioral model inference , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[7]  Jian Pei,et al.  MAPO: mining API usages from open source repositories , 2006, MSR '06.

[8]  Lee J. White,et al.  Firewall regression testing of GUI sequences and their interactions , 2003, International Conference on Software Maintenance, 2003. ICSM 2003. Proceedings..

[9]  Gregory M. Kapfhammer,et al.  Dynamic invariant detection for relational databases , 2011, WODA '11.

[10]  Fevzi Belli,et al.  Event‐based modelling, analysis and testing of user interactions: approach and case study , 2006, Softw. Test. Verification Reliab..

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

[12]  Fevzi Belli,et al.  Testing is an Event-Centric Activity , 2012, 2012 IEEE Sixth International Conference on Software Security and Reliability Companion.

[13]  Benjamin Livshits,et al.  DynaMine: Finding Usage Patterns and Their Violations by Mining Software Repositories , 2011 .

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

[15]  Myra B. Cohen,et al.  Constructing test suites for interaction testing , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[16]  Siau-Cheng Khoo,et al.  LM: a miner for scenario-based specifications , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[17]  Manuvir Das,et al.  Perracotta: mining temporal API rules from imperfect traces , 2006, ICSE.

[18]  Michael D. Ernst,et al.  Efficient incremental algorithms for dynamic detection of likely invariants , 2004, SIGSOFT '04/FSE-12.

[19]  Myra B. Cohen,et al.  An Improved Meta-heuristic Search for Constrained Interaction Testing , 2009, 2009 1st International Symposium on Search Based Software Engineering.

[20]  Matthew B. Dwyer,et al.  Analyzing interaction orderings with model checking , 2004, Proceedings. 19th International Conference on Automated Software Engineering, 2004..

[21]  William G. Griswold,et al.  Quickly detecting relevant program invariants , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[22]  Andreas Zeller,et al.  Automatically Generating Test Cases for Specification Mining , 2012, IEEE Transactions on Software Engineering.

[23]  Myra B. Cohen,et al.  GUI Interaction Testing: Incorporating Event Context , 2011, IEEE Transactions on Software Engineering.

[24]  Andreas Zeller,et al.  Mining temporal specifications from object usage , 2011, Automated Software Engineering.