Demo Model: WebStore


To demonstrate modeling and test automation for a simple web application.

What's Included

This demo includes the following components:

WebStore App

The web app consists of a set of simple html pages (static). Our goal is to test all transitions (links and buttons) to ensure they work as expected. That is, when a button or a link is clicked, it should take you to the correct page.


With this simple example application, we decided to use one state to represent each web page and use one transition to represent a button or a link on each page that takes us to the next page. The result is a state diagram (FSM) as depicted above.

Test Generation

From this model, we then generate the series of sequence (transition traversal) which will walk through different web pages and cover all transitions in the model. To do this, select the OptimalSequencer in Model Property. You can dry-run the model to generate the test sequence (displayed in SeqTrace tab). Or you can click on to display the test sequence in Traverse Graph.

Test Automation

Test sequence is just a series of steps (clicking mouse), you could certainly follow this sequence by manually clicking the web pages to test. With TestOptimal, you can automate this with a set of simple mScript (XML based scripting) which can be viewed at WebStore.xml.

As you have noticed, mScript is just a set of commands to tell TestOptimal what to do when a transition is traversed.

Execute Model

With the model and mScript, you can execute the model and test the web app by clicking on the run button and watch the web pages being clicked away automatically. Make sure you selected Selenium Plugin though (in MBT property).

QR Code
QR Code demo_webstore (generated for current page)