A Graphical Tool for Test Generation from State Models
Abstract
This paper presented a graphical tool for generating test cases based on state models.
The tool provides users with a user-friendly model editor to create their state model in
a tree view structure. The tree based state model can then be saved to a disk in the form
of an xml file and any existing model file can be loaded back into the tool. Two
different traverse algorithms are explored by this tool, state based coverage and
transition based coverage. The tool implements both algorithms and is capable of
generating test paths based on different traversal algorithms. The tool also provides a
code generation process that walks through these test paths and generates test cases in
any one of the supported .NET based programming languages specified by the user.
Lastly, the tool can generate a Visual Studio compatible model file based on the same
state model created by the user. This model serves as a good visual representation of the
state model created by the user in the model editor. The same state model is
represented in three different forms, tree based state model in model editor, xml based
state model in an xml file and graphical based state model in Visual Studio. An example
is used to demonstrate the usage of this tool and the algorithms used behind the scene.