comparing model-based and dynamic event-extraction based gui testing techniques : an empirical study...

24
Comparing model-based and dynamic event- extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal of Systems and Software (Volume 97), November 2014, Pages 15 - 46 Presented by Xin-Hung Chen, 2015-12-05

Upload: anis-oconnor

Post on 17-Jan-2016

224 views

Category:

Documents


10 download

TRANSCRIPT

Page 1: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study

Gigon Bae, Gregg Rothermel, Doo-Hwan BaeThe Journal of Systems and Software (Volume 97), November 2014, Pages 15 - 46Presented by Xin-Hung Chen, 2015-12-05

Page 2: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

2/12

Outline

•Introduction•Preliminaries•GUI testing framework•Test case generation•Empirical study•Conclusion

Page 3: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

3/12

Introduction•Graphical user interfaces are pervasive.•One obvious way to test GUIs is with “manual”

testing.▫Time wasting▫High cost

•Researchers have attempted to create GUI testing techniques that automate the processes of generating and executing test cases.

Page 4: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

4/12

•Automated GUI testing:▫Model-based GUI testing

More effective at detecting faults Less cost

▫Dynamic event-extraction based GUI testing More effective at covering statements.

Introduction(cont.)

Page 5: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

5/12

Introduction(cont.)

•To facilitate this comparison▫ A GUI testing framework

•The overall contributions of this work include the following:▫ A comprehensive experiment comparing the two kinds of GUI testing

techniques.▫ A flexible GUI testing framework that lessens the potential of

implementations.▫ A better understanding of the relative strengths and weaknesses of the

two types of GUI testing techniques.▫ A discussion and better understanding of the various factors affecting

the application of GUI testing techniques.▫ Guidelines for software engineers and researchers on things to

consider.

Page 6: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

6/12

Preliminaries

•GUI testing▫A GUI is composed of a set W of widgets that a user

interacts with through a set A of actions. Each action is accompanied by a set V of values.

▫An event e can be represented by a tuple (w, a, v) w W, a A, and v V.∈ ∈ ∈

Page 7: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

7/12

Preliminaries(cont.)

•GUI test cases▫A test case t is composed of a sequence of

events (e1, e2, . . ., en). The length of t can be defined as the number of events in t.

▫t = (click button 5, click button +, click button 2, click button =)

Page 8: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

8/12

Preliminaries(cont.)

•Event coverage test adequacy▫Event-t-tuple:

Definition: An event-t-tuple (ei, ej, . . ., et) is an ordered tuple of size t of events from E. A set of events E gives rise to |E|t event-t-tuples.

▫t-sequence-cove: Definition: A test suite is t-sequence-cover adequate if it

executes all feasible event-t-tuples by way of an event-t-sequence at least once.

event-2-tuples

Page 9: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

9/12

GUI testing framework

Page 10: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

10/12

GUI testing framework(cont.)

•Strategy▫Example of google map’s path search

Page 11: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

11/12

Test case generation

•Static model-based GUI testing▫Model creation▫Test suite generation▫Test suite execution

•Dynamic event-extraction based GUI testing▫Create test case and executes it at the same

time

Page 12: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

12/12

Test case generation(cont.)

•Static model-based GUI testing▫Model creation

Algorithm 1 Input: an AUT, a terminal event list Output: an event flow graph(EFG model) and a set

of initial events I

Page 13: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

13/12

Test case generation(cont.)

•Static model-based GUI testing▫Test suite generation

Algorithm 2 Input: an EFG model, a set of initial events I and

a test strength T Output: a test suite TS

Page 14: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

14/12

Test case generation(cont.)

•Static model-based GUI testing▫Test suite execution

Algorithm 3 Input: an AUT and a test suite Output: a failure report

Page 15: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

15/12

Test case generation(cont.)

•Dynamic event-extraction based GUI testing▫Create and execute test cases

Algorithm 4 Input: an AUT, a test case length K, and a test suite

size S Output: a failure report and a test suite

Page 16: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

16/12

Empirical study

•To compare techniques, traditional measures such as fault-detection and elapsed time are necessary but not sufficient.▫How to compare the cost?

Page 17: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

17/12

Empirical study(cont.)

•Dependent variables1. Effectiveness in terms of code coverage2. Effectiveness in terms of fault detection3. Cost in terms of numbers of executed events4. Cost in terms of elapsed time5. Event sequence coverage6. GUI State coverage

Page 18: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

18/12

Empirical study(cont.)

•Experiment procedure

Page 19: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

19/12

Empirical study(cont.)

•Experiment procedure

Page 20: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

20/12

Empirical study(cont.)

•Comment

Page 21: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

21/12

Page 22: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

22/12

Page 23: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

23/12

Conclusion

•Model-based GUI testing▫Faults detection▫Less elapsed time

•Dynamic event-extraction GUI testing▫State coverage▫Not effective for short test cases

Page 24: Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal

24/12

Conclusion(cont.)

•The overall contributions of this work include the following:▫ A comprehensive experiment comparing the two kinds of GUI testing

techniques.▫ A flexible GUI testing framework that lessens the potential of

implementations.▫ A better understanding of the relative strengths and weaknesses of the

two types of GUI testing techniques.▫ A discussion and better understanding of the various factors affecting

the application of GUI testing techniques.▫ Guidelines for software engineers and researchers on things to

consider.