|
|
In this tutorial, we will guide you through steps to create the MBT model to test a simple set of web pages. The download package comes with a set of static dummy web pages we will use. The entry page is http://localhost:8888/DemoWebApp/ProductList.html. You may want to quickly browse the pages through to get familiar with them.
First make sure TestOptimal server is up running. We assume TestOptimal server is running on localhost:8888, if not adjust it accordingly. We also use %HOME%/ to indicate the root folder where TestOptimal is installed. The instruction is specific to IE, but you can easily translate it to other browser's.
There are two components we need to create:
The MBT model is built with TestOptimal browser while mScript is created with any XML editor or any text editor.
From the MBT model, the system can generate test sequences to test the application with the help of mScript which drives the web application with each transition (clicking buttons and links).
Let's get started.
Click on the list of steps below in sequence.
What if we want to verify the result? You can accomplish it several ways by putting the verify script in one of the two mScript methods.
Either way, you can use assert script to identify the page being loaded and if it is the page that you are expecting. For example to make sure ProductList page is loaded, you would use:
<assert value1="getValue(id=screenID)" op="eq" value2="ProductList"/>
Check out mScript for more details about mScript and functions.