Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
webstore [2020/05/10 03:37] admin removed |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Tutorial: WebStore ===== | ||
| - | === Background ==== | ||
| - | 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:// | ||
| - | |||
| - | ---- | ||
| - | ==== Start IDE ==== | ||
| - | First make sure // | ||
| - | |||
| - | ---- | ||
| - | ==== Modeling & Automation Scripting ==== | ||
| - | There are two components we need to create: | ||
| - | |||
| - | - MBT model that describes Web Store web application http:// | ||
| - | - mScript to drive Web Store web application [[http:// | ||
| - | |||
| - | The MBT model is built with // | ||
| - | |||
| - | ---- | ||
| - | ==== Test Generation==== | ||
| - | 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). | ||
| - | |||
| - | ---- | ||
| - | ==== Steps By Step==== | ||
| - | |||
| - | There are 4 general steps in developing a model: | ||
| - | |||
| - | - Create Model - Click //File/New Model// to create a new model, use right-mouse context menu to create states and transitions connecting states. Use mouse to move states/ | ||
| - | - Test / Validate Model| - execute the model and view the test sequences generated in MSC graph or in [[TransLogTab| SeqTrace]]. | ||
| - | - Write MScript - output test case or test automation. | ||
| - | - Execute Model - execute the model to generate the test cases into webpage or excel, or interact with web application. | ||
| - | |||
| - | |||
| - | ---- | ||
| - | ==== Test Validation ==== | ||
| - | 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. | ||
| - | |||
| - | * //onentry// method - //onentry// method is triggered (called) when entering the state (web page). This is the easiest if all you want to make sure is the right page is loaded but don't care it gest to that page. | ||
| - | * use //verify// method - //verify// method is triggered (called) when the transition is completed. Use this function to verify the right page is loaded and right content is displayed as the result of the transition. | ||
| - | |||
| - | 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|ProductList]] page is loaded, you would use: | ||
| - | |||
| - | <assert value1=" | ||
| - | |||
| - | Check out [[mScriptTags|mScript]] for more details about mScript and functions. | ||