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 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 MCase View from Model / MCase View or clicking on .

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 Setting. Click on execute button .

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 to run the mCase.

The system automatically generate test sequences that covers all links and buttons on the page.