Create a model to represent your application’s business processes. After creating the model, you choose paths in the model to test based on your testing strategy.
Create a model
You can create a model using units you have already defined, or using placeholders that you later replace with units. You can also include a model as a sub-model, inside a larger model.
Tip: You can also import a BPMN file to inject its model into MBT, as described in BPMN integration.
To create a model:
Select a folder in the left pane, or create a new folder. This structure enables you to organize your MBT models in a way that is meaningful to you.
In the Models tab, click + Model.
Enter the model's name, and fill any other fields that are relevant.
Note: For details on working with options in the form such as auto-fill, attachments, or custom fields, see Common functionality.
Click the model ID to open a model for editing.
Drag and drop elements from the left pane to create a model diagram in the central pane. This is done using a combination of Tools and Components.
Example: This shows a simple model with three units, to illustrate the various elements described below:
From the Tools area, drag and drop any of the following:
This is a temporary element to reserve a space for another component.
Drag and drop a placeholder in the model diagram. You can then drop an element from the Components area on to the placeholder at any time. This will replace the placeholder in the model's structure. You can also right-click a placeholder and use its context menu to replace it with a unit.
For example, this is useful if you want to first build a model, and then create units to replace the placeholders.
Drag and drop this on to the diagram to create a new unit. For details, see Model units.
The unit will then be added to the Components area.
A gateway can have multiple inputs and outputs, and is used to build optional process flows.
For example, in the image above a gateway leads to three possible choices.
Add a note to the diagram.
You can drop a comment element in an empty space to create a general note in the model. This is not connected to a specific element in the diagram.
You can also drop a comment on to a specific unit or model in the diagram. In this case a comment icon appears on the element, and you can hide or show the comment. If you move the element, its comment moves as well.
From the Components area, drag and drop units or models on to the model diagram.
Use the filter and search buttons at the top of the left pane to locate components.
You can nest a model inside a model. In this case you can expand the sub-model to see its contents, but they are read-only.
You can also nest a sub-model inside another sub-model, but you cannot expand the nested sub-model. This is limited to a single layer.
Within a model diagram, you can use the following actions:
Zoom in or out of the diagram using the controls at the lower left corner.
Undo or re-do actions using CTRL-Z and CTRL-Y.
Delete elements using DELETE. Note that the Start and End elements are permanent and cannot be removed.
After placing tools and components on the diagram, click and drag from the edge of one element to another to create connections between them.
Use the buttons at the top of the diagram to Save changes, Discard changes, or Refresh the model using the last-saved display. Click Apply layout to automatically organize the model in a structured display.
After saving a model, you can select it in the Models tab and see its diagram in the right pane.
Add relations to a model
You can create requirements and features in MBT, and then link models or units to those entities. This can help you to ensure that new features or requirements are properly covered in testing.
Relations are automatically created between models or units and their tests.
To add relations to a model:
Create requirements or features using the Requirements module. For details, see Requirement management.
In the Models tab, open a model.
In the Relations tab, create relations between the model and its related requirements or features. For details, see Relations and dependencies.
Relations between models or units and a test are created automatically when you generate the test. In addition, if you add a sub-model or unit to a model with related tests, the tests are automatically related to the new unit or sub-model.
Modify a model's details and phases
You can add the following details to your model:
In the Details tab you can add tags to a model, assign a model to your My Work area, view custom fields, and more. For details on working with these options, see Common functionality.
In the upper right corner of the UI, set the Model's Phase. MBT uses phases to represent the current state of an item. As you work on items, advance them from phase to phase. When you set a model's phase to Ready, the icon representing the model changes color from gray to blue.