Ideas
- Intelligent Test Automation - Why use MBT?
- Practical Model Based Testing: A Tools Approach - This book gives a decent overview of the various styles of model based testing and a good first look at how an organization that already has test automation can expand into model based testing.
Kinds of MBT
Most model based testing frameworks can be divided into two categories, Extended Finite State Machine based or Pre/Post Model based.
Extended Finite State Machine
Finite State Machine that maintains additional state data in any given state. Each model is defined, either through code or a gui, as a finite state machine which the software then walks through to generate the test cases.
Examples:
Pre/Post Models
There are a variety of styles of pre/post models. What they all have in common is that they operate through defining a set of rules that get triggered under specified conditions.
Tools
Event-B
- Event-B
- Model based development tool.
- Developed in Java.
- Uses a formal syntax which proof can be performed on.
- Has an MBT plugin.
MISTA
- MISTA
- Based on Petri Nets (a formal syntax)
- Developed in an academic environment.
Osmo
- Site: Osmo
- Free, open source
- Programmed in Java (or in theory any JVM language)
- Based in Abstract State Machines
- User Guide
- Intended as an actively developed free tool.
PyModel
- PyModel
- Developed in an academic environment
- Inspired by NModel
SpecExplorer
- SpecExplorer
- Developed by Microsoft for use with Visual Studio
- Based in Abstract State Machines
- Runs tests online, or produces unit tests in C# for offline.
- Free, closed source, commercial.
- Programmed in a combination of C# and Spec# (custom language)
- Tutorial Videos
TestOptimal
- TestOptimal
- Commercial, costs $1,895
- Based in Extended Finite State Machines (EFSM)
- Interface through the web browser, allowing multiple developers to work from the same machine
- Design is performed through a combination of GUI, XML and Java
Uses
Automated Functional Test Generation
This is the most common use for MBT systems, where a model is created describing the system, and tests are generated in some target test language.
Performance Test Generation
Something I haven't seen a lot of, but should be possible. This could either work in a similar way to functional test generation, perhaps creating files used by a program like JMeter, or could use on-the-fly testing to generate multiple streams.
Log Based Testing
I think this is one of the more interesting potential uses for on-the-fly testing. Rather than test the system directly, rig the system to generate detailed logs, then run it as normal. Develop a model of the system with an eye to the data generated by the logs, then run the model on the log files to verify that they are correct. This has the advantage of being able to test complex systems that are dependent on reaction time, like games. It could also be applied to embedded systems where it would be difficult to directly hook an automation system in.