Thursday, April 3, 2008

Java MBT implementation

More and more implementations of the Model-Based Testing approach seem to be appearing. Here's another open source implementation I found recently: mbt.tigris.org.

This implementation is in Java and uses GraphML, an XML format for drawing graphs, as a modeling language.

GraphML is an interesting choice for a language. The example models have a lot of graphical drawing information in them that isn't needed for behavioral modeling. However, being able to create the models in a graphical tool is a nice feature.

Overall, a welcome contribution to the growing list of model-based testing tools and worth a look for anyone interested in such tools.

Update: My initial impression that this tool does not have support for variables or guard conditions was incorrect. That's what I get for commenting on a tool that I haven't taken the time to download and play around with yet. See the comments by Kristian, the tool's author.

2 comments:

Kristian said...

Hi,

In order to use the variables and guards, the Extended Finite State Machine (EFSM) functionality must be enabled. This is done using the -x flag.

The tool distinguish between FSM and EFSM, and only the EFSM takes advantage of the guards and variables.

The variables are used by the the guards to filter in or out edges, but, they can also be used by the execution engine. In the demo, this is done when verifying that the correct amount of books exists in the shopping cart:
org.tigris.mbt.ModelBasedTesting.getDataValue( "num_of_books" );
The value is then compared with the value stated by amazon.com

All this can be re-viewed in the demo example, both the model and the sample code.

Best regards Kristian Karl

Chris Struble said...

Kristian,

Thanks for the clarification. I'll make an update to the original post correcting these points.