Differences

This shows you the differences between two versions of the page.

Link to this comparison view

createusecase [2016/09/22 02:35] (current)
Line 1: Line 1:
 +===== Tutorial: How To Create MCase =====
  
 +This tutorial shows you how to create a test case using mCase.
 +
 +mCase is a collection of transitions and states in your model together make up a scenario of your test case.
 +
 +In this tutorial, we will demonstrate how you can create mCase to test two scenarios. We will use our demo app [[WebStore|WebStore]] as our web applications.
 +
 +----
 +==== Test Scenario ====
 +The first scenario is to test the situation that a customer visits ProductList page, adds one item to the shopping cart and goes through checkout page.
 +
 +----
 +==== Create MCase ====
 +We start by opening the [[modeling_mcase_view| MCase View]] from //Model / MCase View// or clicking on {{http://​testoptimal.com/​img/​mcaseView.png}}.
 +
 +Next is to click on //Add MCase// button and enter the name of the mCase: //​QuickPurchase//​ and a brief description.
 +
 +Once the //mcase// is create, we can proceed to add states and transitions to the //mcase//.
 +
 +
 +----
 +=== Populate MCase====
 +To add states and transitions to the //​mcase ​ QuickPurchase//​ we just created, we first identify the states and transitions and highlight them by mouse clicking on the states and transitions while holding down the //shift// key. You should see the states and transitions are highlighted in red dotted boxes.
 +
 +The transitions that represent these actions are: //AddItem// transition on //​ProductList//​ page, //Order// transition on //​ShoppingCart//​ page and //Pay// transition on //​Checkout//​ page. Use the instruction above to highlight these transitions.
 +
 +Next we need to add the highlighted transitions to the //mcase// by right-mouse clicking on one of the highlighted transitions and select //Add to MCase// menu. On the prompt dialog, select //​QuickPurchase//​ from the //mcase// drop-down list and click //Ok// button.
 +
 +That's it, you have created the test case that simulates a customer making a quick purchase.
 +
 +----
 +==== Execute MCase ====
 +To execute the //mcase// //​QuickPurchase//,​ select //​mCaseSerial//​ in [[mbt_node|MBT Setting]]. Click on execute button {{http://​TestOptimal.com/​img/​start.png}}.
 +
 +**Comment**:​ Imagine that if your web application has hundreds of pages and the pages you need to test is 20 links down from the initial login page. The system will be able to traverse pages down to the first page of your mCase automatically based on your model.
 +
 +
 +----
 +==== Second MCase ====
 +The second scenario is to test all links and buttons on a page.
 +
 +First create an mCase by following the same steps described earlier. This time we highlight the state that represents the page to be tested and add the state to the //mcase//.
 +
 +That's it, click on the execute button {{http://​TestOptimal.com/​img/​start.png}} to run the mCase.
 +
 +The system automatically generate test sequences that covers all links and buttons on the page.
Print/export
QR Code
QR Code createusecase (generated for current page)