Main concepts
The main goal of this paper is to combine a black-box testing and a white-box testing approach to generate EFG (event flow graph) and ESG (event sequence graph), that are executable on the GUI, and that eventually lead to automatically generated GUI tests.
We propose a new approach to select relevant event sequences among the event sequences generated by a black-box model
- events and events handlers are extracted from the GUI (1)
- a dependency relation is determined (e.g., event B cannot happen if event A is not triggered before) (2)
- the detected dependency relation leads to a EDG (Event Dependency Graph), which can be used to infer the relevance of a sequence (3)
- EDG is used together with a black-box model to construct a selection of executable and relevant test cases: (4)
This approach brought to life Gazoo, a tool that has been tested on four open source GUI applications. Previously undetected bugs are found.
(1) Event handler extraction: each event in the GUI is encoded as an event handler.
- First, the GUI application is executed and all the GUI’s widget are identified and enumerated (windows, buttons, text fields)
- A reflection (Java) technique is used to obtain the Java object corresponding to each widget. We ask Java to invoke the method getActionListeners that returns the widget’s event handlers. The widgets IDs are used as identifiers. If a widget has not a getActionListeners it means no event handler is registered to this widget.