A Context-Aware Approach for Dynamic GUI Testing of Android Applications

In this paper, we propose an automatic GUI testing approach for Android applications. With the goal of exploring unexecuted event handlers of the application under test as quickly possible, our approach constructs and maintains a dynamic GUI model of the application at run time, which is based on extended non-deterministic labelled transition system that records the weight of transitions between GUI states. Extracting only part of the GUI features of the application under test, the model keeps itself simple enough to avoid state explosion and improves the test efficiency, but provides targeted guidance for testing event generation at the same time. A practical probabilistic search-based event selection algorithm is used to leverage information provided by the model, transform weight of transitions to priority of candidate events, and select the testing event to execute. The algorithm solves the non-deterministic problem introduced by the approximation of the model. Empirical evaluation on several real world applications shows that our approach can achieve high code coverage quickly and detect bugs efficiently.

[1]  Jan Tretmans,et al.  Model Based Testing with Labelled Transition Systems , 2008, Formal Methods and Testing.

[2]  Hassan Reza,et al.  A Model-Based Approach for Testing GUI Using Hierarchical Predicate Transition Nets , 2007, Fourth International Conference on Information Technology (ITNG'07).

[3]  Hongseok Yang,et al.  Automated concolic testing of smartphone apps , 2012, SIGSOFT FSE.

[4]  Fevzi Belli,et al.  Finite state testing and analysis of graphical user interfaces , 2001, Proceedings 12th International Symposium on Software Reliability Engineering.

[5]  Gerard J. Holzmann,et al.  A practical method for verifying event-driven software , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[6]  Porfirio Tramontana,et al.  A GUI Crawling-Based Technique for Android Mobile Application Testing , 2011, 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops.

[7]  Mukul R. Prasad,et al.  Automated testing with targeted event sequence generation , 2013, ISSTA.

[8]  Tao Xie,et al.  A Grey-Box Approach for Automated GUI-Model Generation of Mobile Applications , 2013, FASE.

[9]  Iulian Neamtiu,et al.  Automating GUI testing for Android applications , 2011, AST '11.

[10]  Mayur Naik,et al.  Dynodroid: an input generation system for Android apps , 2013, ESEC/FSE 2013.

[11]  George C. Necula,et al.  Guided GUI testing of android apps with minimal restart and approximate learning , 2013, OOPSLA.

[12]  Marius Mikucionis,et al.  Formal Methods and Testing , 2008 .