Unlike a CLI (command-line interface) system, a GUI may have additional operations that need to be tested.
A test designed to follow a certain path through the GUI may then fail since a button, menu item, or dialog may have changed location or appearance.
Many different techniques have been proposed to automatically generate test suites that are complete and that simulate user behavior.
For example, finite-state-machine-based modeling[2][3] – where a system is modeled as a finite-state machine and a program is used to generate test cases that exercise all states – can work well on a system that has a limited number of states but may become overly complex and unwieldy for a GUI (see also model-based testing).
A novel approach to test suite generation, adapted from a CLI technique[4] involves using a planning system.
[5] Planning is a well-studied technique from the artificial intelligence (AI) domain that attempts to solve problems that involve four parameters: Planning systems determine a path from the initial state to the goal state by using the operators.
A planning system, by its very nature, generates solutions to planning problems in a way that is very beneficial to the tester: When manually creating a test suite, the tester is more focused on how to test a function (i. e. the specific path through the GUI).
By using a planning system, the path is taken care of and the tester can focus on what function to test.
[7] Another method of generating GUI test cases simulates a novice user.
The difficulty lies in generating test suites that simulate 'novice' system usage.
Genetic algorithms work as follows: a set of 'genes' are created randomly and then are subjected to some task.
To combat this and other problems, testers have gone 'under the hood' and collected GUI interaction data from the underlying windowing system.
[9] By capturing the window 'events' into logs the interactions with the system are now in a format that is decoupled from the appearance of the GUI.
This approach can be made easier by using an MVC architecture for example and making the view (i. e. the GUI here) as simple as possible while the model and the controller hold all the logic.