Abstract
Recent advances in automated functional testing
of Graphical User Interfaces (GUIs) rely on deriving graph
models that approximate all possible sequences of events that
may be executed on the GUI, and then use the graphs to generate
test cases (event sequences) that achieve a specified coverage
goal. However, because these models are only approximations of
the actual events flows, the generated test cases may suffer from
problems of infeasibility, i.e., some events may not be available
for execution causing the test case to terminate prematurely. In
this paper we develop a method to automatically repair GUI
test suites, generating new test cases that are feasible. We use
a genetic algorithm to evolve new test cases that increase our
test suite's coverage while avoiding infeasible sequences. We
experiment with this algorithm on a set of synthetic programs
containing different types of constraints and for test sequences
of varying lengths. Our results suggest that we can generate new
test cases to cover most of the feasible coverage and that
the genetic algorithm outperforms a random algorithm trying
to achieve the same goal in almost all cases.
Experiment Settings
- CPU: AMD 2.4GHz dual-core 64-bit processors
- Memory: 16GB
- Operating System: Linux 2.6.18
- Java Runtime: Java 1.6 update 16
- GUI Environment: Xvfb
Subjects We designed seven synthetic programs
to mimic the types of constraints found in real software. These programs
have no real functionality other than to implement the constraints. The
following table provides detailed descriptions for each. These benchmarks
are also included on the COMET
Benchmarking website along with information about the tools
necessary to run and execute the experiments.
The events in each program are labeled Event1, Event2, etc.
The presence of "..." indicates 0 or more other events). Click
the program numbers to download the source code of the programs,
and click the constraint full names to download the constraint files.
View format of the
constraint files. We have also provided a simple
tool for the conversion from the constraint file in our format
to that in the format presented on
http://www.cse.unl.edu/citportal/tools/casa/.
Download the tool here.
Program |
Full Name |
Abbreviated |
Number of Events |
Constraint Description |
1 |
Disabled Event Constraint |
Disb |
3 |
Event1 is always disabled. |
2 |
Requires Constraint |
Reqs |
3 |
Event3 requires Event2 to occur before it. |
3 |
Event Consecutive Constraint (2-way) |
2Cons |
3 |
A pair of events, (Event1, Event2), is infeasible when executed sequentially. |
4 |
Excludes Constraint (2-way) |
2Excl |
3 |
A pair of events, (Event1, ..., Event2), is infeasible if they occur (possibly non-consecutively) in
sequences. |
5 |
Event Consecutive Constraint (3-way) |
3Cons |
4 |
A sequence of three events, (Event1, Event2, Event3), is infeasible when executed. |
6 |
Excludes Constraint (3-way) |
3Excl |
5 |
A (possibly non-consecutive) sequence of three events, (Event1, ..., Event2, ..., Event3), is infeasible. |
7 |
Compound Constraints |
Cmpd |
5 |
Includes constraints found in Subject 2, 3 and 5: sequences (Event1, Event2) and (Event2, Event3, Event4)
are infeasible; Event5 requires Event3 to occur before it. |
Results
We provide results for our experiments on the seven subjects. In the paper, we run each experiment five times and show the average. We have included all of the he results for each of the five runs here. We represent events using integers in the test cases. These are zero based (but the programs are one-based) so integer i means Event(i+1). The parameters used can be found in the paper. View format for the covering array models(the specific models can be found by clicking the links in the "Length" column),format for the infeasible t-sets and format for the test suite files.
Acknowledgments
We would like to thank Scott McMaster for providing
us with the replayer modified for our experiments, and
Mary Lou Soffa for early discussions on this work. This
work was partially supported by the US National Science
Foundation under grants CCF-0747009, CCF-0447864,
CNS-0855139 and CNS-0855055, the Air Force Office of
Scientific Research through award FA9550-09-1-0129, the
Office of Naval Research grant N00014-05-1-0421 and by
the Defense Advanced Research Projects Agency.
|