Using a goal-driven approach to generate test cases for GUIs

The widespread use of GUIs for interacting with software is leading to the construction of more and more complex GUIs. With the growing complexity comes challenges in testing the correctness of a GUI and the underlying software. We present a new technique to automatically generate test cases for GUIs that exploits planning, a well developed and used technique in artificial intelligence. Given a set of operators, an initial state and a goal state, a planner produces a sequence of the operators that will change the initial state to the goal state. Our test case generation technique first analyzes a GUI and derives hierarchical planning operators from the actions in the GUI. The test designer determines the preconditions and effects of the hierarchical operators, which are then input into a planning system. With the knowledge of the GUI and the way in which the user will interact with the GUI, the test designer creates sets of initial and goal states. Given these initial and final states of the GUI, a hierarchical planner produces plans, or a set of test cases, that enable the goal state to be reached. Our technique has the additional benefit of putting verification commands into the test cases automatically. We implemented our technique by developing the GUI analyzer and extending a planner. We generated test cases for Microsoft's Word-Pad to demonstrate the viability and practicality of the approach.

[1]  Muneo Kitajima,et al.  A computational model of skilled use of a graphical user interface , 1992, CHI.

[2]  Jeffrey J. Hendrickson,et al.  Integrated data capture and analysis tools for research and testing on graphical user interfaces , 1992, CHI.

[3]  Brad A. Myers,et al.  Why are Human-Computer interfaces Difficult to Design and Implement? , 1993 .

[4]  James A. Hendler,et al.  Toward a general framework for hierarchical task-network planning , 1993 .

[5]  James A. Hendler,et al.  HTN Planning: Complexity and Expressivity , 1994, AAAI.

[6]  Steve Hanks,et al.  Optimal Planning with a Goal-directed Utility Model , 1994, AIPS.

[7]  Avrim Blum,et al.  Fast Planning Through Planning Graph Analysis , 1995, IJCAI.

[8]  Muneo Kitajima,et al.  A comprehension-based model of correct performance and errors in skilled, display-based, human-computer interaction , 1995, Int. J. Hum. Comput. Stud..

[9]  Lee J. White Regression testing of GUI event interactions , 1996, 1996 Proceedings of International Conference on Software Maintenance.

[10]  David J. Kasik,et al.  Toward automatic generation of novice user test scripts , 1996, CHI.

[11]  Daniel P. Siewiorek,et al.  A method to automate user interface testing using variable finite state machines , 1997, Proceedings of IEEE 27th International Symposium on Fault Tolerant Computing.

[12]  Bernhard Nebel,et al.  Extending Planning Graphs to an ADL Subset , 1997, ECP.

[13]  B. Selman The Role of Domain-speciic Knowledge in the Planning as Satissability Framework , 1998 .

[14]  Stephen F. Smith,et al.  AIPS-'98 : proceedings : Fourth International Conference on Artificial Intelligence Planning Systems , 1998 .

[15]  Thomas J. Ostrand,et al.  A visual test development environment for GUI systems , 1998, ISSTA.

[16]  Bart Selman,et al.  The Role of Domain-Specific Knowledge in the Planning as Satisfiability Framework , 1998, AIPS.

[17]  Stephen F. Smith,et al.  Proceedings: The Fourth International Conference on Artificial Intelligence Planning Systems , 1998 .

[18]  Jim Clarke Automated test generation from a behavioral model , 1998 .