Top Banner
A metaheuristic approach to automatic test case generation for application with GUI Belhassen Ouerghi
24
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: MetaheuristicApproach

A metaheuristic approach to automatic test case generation

for application with GUI

Belhassen Ouerghi

Page 2: MetaheuristicApproach

The metaheuristic methods

Page 3: MetaheuristicApproach

The problem

Page 4: MetaheuristicApproach

The problem

● Users love features and options.

● The majority of software application employ a graphical user interface(GUI).

● The GUI are becoming more and more complex (more options, more features).

● Testing a GUI taking into consideration (fonctionality,securitiy, usability…) is laborious and resource intensive.

Page 5: MetaheuristicApproach

New generation of GUI

Page 6: MetaheuristicApproach

Old school GUI

Page 7: MetaheuristicApproach

The solution

Page 8: MetaheuristicApproach

The solution

● Automating the process of testing.

● Scripting and capture and reply is the most common technique in the industry.

Page 9: MetaheuristicApproach

Is it really a good solution?

Page 10: MetaheuristicApproach

Why?

● Actions need often to be in specific order.

● Actions have to appear in the context of certain other actions to provoke faults.

● Tester have to compile the entire test suite.

● Slight changes to the GUI of SUT will break tests.

We do have obviously a problem to generate automatically test sequences.

Page 11: MetaheuristicApproach

The metaheuristic approach

● The problem of generating test sequences to GUIs will be treated as an optimization problem.

● Ant colony optimization algorithm is employed.

● New metric called MCT(Maximum Call Tree) is used to search fault-sensitive test cases.

Page 12: MetaheuristicApproach

How ant colony optimize their way

Page 13: MetaheuristicApproach

The event flow graph (EFG)

● Since many sequence are infeasible like this one: s=(Edit, Paste) it is helpful to employ a model of the GUI.

Page 14: MetaheuristicApproach

The maximum call tree criterion (MCT)

● Choosing the right criteria is critical for finding faults.

● Generating sequences that induce a large call tree within the SUT.

● Sequences are generated online (executing the SUT) therefore no need for a model of the GUI.

● Don‘t have to deal with the infeasibility.

Page 15: MetaheuristicApproach

The maximum call tree criterion (MCT)

Page 16: MetaheuristicApproach

Merging thread

Page 17: MetaheuristicApproach

Test environment requierment

● To be able to scan the GUI of the SUT to obtain all visible widgets and their properties(size, position, focus…).

● To derive a set of interesting actions(visible, enabled button, is clickable…).

● To give these actions unique name.

● To execute sequences of these actions.

Page 18: MetaheuristicApproach

How sequences are generated

Page 19: MetaheuristicApproach

The framework

Page 20: MetaheuristicApproach

RandomVs ACO

● K is the number of top-K sequences in every generation.

● α is the pheromone evaporation rate.

● ρ is the probability parameter for the pseudo proportional random selection rule.

Page 21: MetaheuristicApproach

Conclusion

We used the ACO optimization algorithm directed by MCT to automatically generate the input sequence for application with GUI.

Since we forgo the application of GUI model there is no risk of generating infeasible sequences.

Page 22: MetaheuristicApproach

References

● http://de.wikipedia.org/wiki/Ameisenalgorithmus

● „A Metaheuristic Approach to Test sequence Generation for Applications with a GUI“ paper from Sebastian Bauersfeld, Stefan Wappler, Joachim Wegner.

● http://en.wikipedia.org/wiki/Metaheuristic

Page 23: MetaheuristicApproach

A question

Is testing a GUI really an optimization problem?

Are we searching or planning when we test?

Find it out at 19.06.2013

Page 24: MetaheuristicApproach