Documentos de Académico
Documentos de Profesional
Documentos de Cultura
If the path condition becomes false, i.e., there is no Each GUI widget has zero or more event listeners L
set of inputs that satisfy it, this means that the symbolic registered for events performed on the widget. Event
state is not reachable, and symbolic execution does not listeners contain computational logic and are notified
continue for that path. For example, statement (7) is (their methods invoked) when the corresponding event
unreachable. occurs. Examples of listeners are selection listener,
modification listener, etc. Formally, event listeners are
3.2. GUI testing approaches
defined as:
Since contemporary software extensively uses
∀w ∈W | ∃Lw ⊇ L ∧ ∀l ∈ Lw | ∃El ⊇ Ew ∧ ∀e ∈ El | reg(l, e)
GUIs to interact with users, verifying GUI’s reliability
becomes important. There are two approaches to Since the user interacts with the GUI through
building GUIs and these two approaches affect how events, a GUI test case (from the set T of GUI test
testing can be done. cases) is an event sequence. Formally, a GUI test case
The first approach is to keep the GUI light weight is defined:
and move computation into the background. In such
cases the GUI could be considered as a “skin” for the ∀t ∈ T : t =< e1 , e2 ,..., e p >
software. Since the main portion of the application
code is not in the GUI, it may be tested using 4. Barad
conventional software testing techniques. However, This section presents Barad, our GUI testing
such an approach places architectural limitations on framework. We present the adopted abstractions and
system designers. processes enabling systematic testing of GUI
The second approach is to merge the GUI and its applications using symbolic execution.
computations. The most common way of testing such
GUIs is by using tools that record and replay event 4.1. GUI testing process in Barad
sequences [17]. This is laborious and time consuming.
Another technique for checking GUI’s correctness is The process of GUI testing performed by Barad is
by using tools for automatic test generation, execution, shown on Figure 4. To enable symbolic execution,
and assessment as the one presented in this paper or Barad instruments the bytecode of the tested GUI
the ones described in [9] [12] . application replacing concrete entities (widgets,
strings, primitives, library classes) with their
3.3. GUI model corresponding symbolic equivalents (symbolic
We take a standard view of each GUI. Let widgets, symbolic strings, symbolic integers etc.)
W = {w1, w2 ,...wn } be the set of GUI widgets. Examples provided by Barad’s symbolic library. The bytecode
instrumentation is implemented with the ASM library
of widgets are Button, Combo, Label, etc. Each widget
has a set of properties. Let P = { p1 , p2 ,... pm } be the set
[2]. As a result of the instrumentation phase an FocusEvent, HelpEvent, KeyEvent, MouseEvent,
executable symbolic version of the GUI is generated. PaintEvent, and TraverseEvent. In addition, there are
Next, a symbolic analysis of the instrumented some widget specific events: buttons accept
version is performed. During this process event SelectionEvent; textboxes accept SelectionEvent,
listeners are detected, chains of event listener method ModifyEvent, and VerifyEvent; combos accept
invocations are generated, and then symbolically SelectionEvent and ModifyEvent. Table 2 presents the
executed – i.e., all paths are systematically explored widget specific events for the Fare Calculator.
and their feasibility evaluated by constraint solving.
Widge Possible Widgets Total
Barad library GUI under test Button 1 5 5
Text 2 6 12
Combo 2 1 2
Symbolic Agent