Using genetic programming to evolve action selection rules in traversal-based automated software testing: results obtained with the TESTAR tool

Traversal-based automated software testing involves testing an application via its graphical user interface (GUI) and thereby taking the user’s point of view and executing actions in a human-like manner. These actions are decided on the fly, as the software under test (SUT) is being run, as opposed to being set up in the form of a sequence prior to the testing, a sequence that is then used to exercise the SUT. In practice, random choice is commonly used to decide which action to execute at each state (a procedure commonly referred to as monkey testing), but a number of alternative mechanisms have also been proposed in the literature. Here we propose using genetic programming (GP) to evolve such an action selection strategy, defined as a list of IF-THEN rules. Genetic programming has proved to be suited for evolving all sorts of programs, and rules in particular, provided adequate primitives (functions and terminals) are defined. These primitives must aim to extract the most relevant information from the SUT and the dynamics of the testing process. We introduce a number of such primitives suited to the problem at hand and evaluate their usefulness based on various metrics. We carry out experiments and compare the results with those obtained by random selection and also by Q-learning, a reinforcement learning technique. Three applications are used as Software Under Test (SUT) in the experiments. The analysis shows the potential of GP to evolve action selection strategies.

[1]  Qunxiong Zhu,et al.  Integrating Evolutionary Testing with Reinforcement Learning for Automated Test Generation of Object-Oriented Software , 2015 .

[2]  Markus Brameier,et al.  On linear genetic programming , 2005 .

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

[4]  Om Prakash Sangwan,et al.  Metrics for Event Driven Software , 2016 .

[5]  Pekka Aho,et al.  Dynamic reverse engineering of GUI models for testing , 2013, 2013 International Conference on Control, Decision and Information Technologies (CoDIT).

[6]  Tanja E. J. Vos,et al.  TESTAR: Tool Support for Test Automation at the User Interface Level , 2015, Int. J. Inf. Syst. Model. Des..

[7]  John R. Koza,et al.  Genetic programming - on the programming of computers by means of natural selection , 1993, Complex adaptive systems.

[8]  Robert Feldt,et al.  Visual GUI testing in practice: challenges, problemsand limitations , 2015, Empirical Software Engineering.

[9]  Mark Harman,et al.  The Oracle Problem in Software Testing: A Survey , 2015, IEEE Transactions on Software Engineering.

[10]  Hans-Gerhard Groß,et al.  A Genetic Programming Approach to Automated Test Generation for Object-Oriented Software , 2006, Int. Trans. Syst. Sci. Appl..

[11]  Kenneth O. Stanley,et al.  Novelty Search and the Problem with Objectives , 2011 .

[12]  Tanja E. J. Vos,et al.  Evolving Rules for Action Selection in Automated Testing via Genetic Programming - A First Approach , 2017, EvoApplications.

[13]  Joachim Wegener,et al.  Evolutionary unit testing of object-oriented software using strongly-typed genetic programming , 2006, GECCO '06.

[14]  Anna Esparcia-Alcázar,et al.  Fitness approximation for bot evolution in genetic programming , 2013, Soft Comput..

[15]  Tanja E. J. Vos,et al.  Evaluating the TESTAR tool in an industrial case study , 2014, ESEM '14.

[16]  Tanja E. J. Vos,et al.  Evaluating rogue user testing in industry: An experience report , 2014, 2014 IEEE Eighth International Conference on Research Challenges in Information Science (RCIS).

[17]  Joachim Wegener,et al.  A Metaheuristic Approach to Test Sequence Generation for Applications with a GUI , 2011, SSBSE.

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