Learning user interface element interactions

When generating tests for graphical user interfaces, one central problem is to identify how individual UI elements can be interacted with—clicking, long- or right-clicking, swiping, dragging, typing, or more. We present an approach based on reinforcement learning that automatically learns which interactions can be used for which elements, and uses this information to guide test generation. We model the problem as an instance of the multi-armed bandit problem (MAB problem) from probability theory, and show how its traditional solutions work on test generation, with and without relying on previous knowledge. The resulting guidance yields higher coverage. In our evaluation, our approach shows improvements in statement coverage between 18% (when not using any previous knowledge) and 20% (when reusing previously generated models).

[1]  Alex Groce,et al.  Code coverage for suite evaluation by developers , 2014, ICSE.

[2]  Chris Watkins,et al.  Learning from delayed rewards , 1989 .

[3]  Tanja E. J. Vos,et al.  A Reinforcement Learning Approach to Automated GUI Robustness Testing , 2012 .

[4]  Andreas Zeller,et al.  DroidMate-2: A Platform for Android Test Generation , 2018, 2018 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[5]  Andreas Zeller,et al.  DroidMate: A Robust and Extensible Test Generator for Android , 2016, 2016 IEEE/ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft).

[6]  Michael N. Katehakis,et al.  The Multi-Armed Bandit Problem: Decomposition and Computation , 1987, Math. Oper. Res..

[7]  Michael I. Gordon,et al.  Covert Communication in Mobile Applications (T) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[8]  Alessandra Gorla,et al.  Automated Test Input Generation for Android: Are We There Yet? (E) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[9]  Iulian Neamtiu,et al.  Targeted and depth-first exploration for systematic testing of android apps , 2013, OOPSLA.

[10]  R. Bellman A Markovian Decision Process , 1957 .

[11]  Alper Sen,et al.  QBE: QLearning-Based Exploration of Android Applications , 2018, 2018 IEEE 11th International Conference on Software Testing, Verification and Validation (ICST).

[12]  Yuanchun Li,et al.  DroidBot: A Lightweight UI-Guided Test Input Generator for Android , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C).

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

[14]  David Lie,et al.  IntelliDroid: A Targeted Input Generator for the Dynamic Analysis of Android Malware , 2016, NDSS.

[15]  Benjamin Van Roy,et al.  A Tutorial on Thompson Sampling , 2017, Found. Trends Mach. Learn..

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

[17]  H. Robbins Some aspects of the sequential design of experiments , 1952 .

[18]  Alessandra Gorla,et al.  Detecting Behavior Anomalies in Graphical User Interfaces , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C).

[19]  Mehryar Mohri,et al.  Multi-armed Bandit Algorithms and Empirical Evaluation , 2005, ECML.

[20]  W. R. Thompson ON THE LIKELIHOOD THAT ONE UNKNOWN PROBABILITY EXCEEDS ANOTHER IN VIEW OF THE EVIDENCE OF TWO SAMPLES , 1933 .

[21]  W. Buxton Human-Computer Interaction , 1988, Springer Berlin Heidelberg.

[22]  Ben J. A. Kröse,et al.  Learning from delayed rewards , 1995, Robotics Auton. Syst..

[23]  Andreas Zeller,et al.  Guiding App Testing with Mined Interaction Models , 2018, 2018 IEEE/ACM 5th International Conference on Mobile Software Engineering and Systems (MOBILESoft).

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

[25]  Yang Liu,et al.  Guided, stochastic model-based GUI testing of Android apps , 2017, ESEC/SIGSOFT FSE.

[26]  William K. Robertson,et al.  CuriousDroid: Automated User Interface Interaction for Android Application Analysis Sandboxes , 2016, Financial Cryptography.

[27]  Porfirio Tramontana,et al.  Using GUI ripping for automated testing of Android applications , 2012, 2012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.

[28]  Michael Kolonko,et al.  On the k-armed Bernoulli bandit: monotonicity of the total reward under an arbitrary prior distribution , 1984 .

[29]  Porfirio Tramontana,et al.  MobiGUITAR: Automated Model-Based Testing of Mobile Apps , 2015, IEEE Software.

[30]  Tanja E. J. Vos,et al.  Q-learning strategies for action selection in the TESTAR automated testing tool , 2016 .

[31]  Peter Dayan,et al.  Q-learning , 1992, Machine Learning.

[32]  Lihong Li,et al.  An Empirical Evaluation of Thompson Sampling , 2011, NIPS.

[33]  Tanja E. J. Vos,et al.  User Interface Level Testing with TESTAR; What about More Sophisticated Action Specification and Selection? , 2014, SATToSE.