Models

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:

  1. 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.

  2. In the Models tab, click + Model.

  3. 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.

  4. Click the model ID to open a model for editing.

  5. 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:

    Tool Description

    Placeholder

    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.

    New unit

    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.

    Gateway

    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.

    Comment

    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.

  6. 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.

  7. 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.

  8. 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.

  9. After placing tools and components on the diagram, click and drag from the edge of one element to another to create connections between them.

  10. 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.

Back to top

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:

  1. Create requirements or features using the Requirements module. For details, see Requirement management.

  2. In the Models tab, open a model.

  3. 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.

    Example: In this example, the model "Card selection" is a sub-model in the "New bank customer" model. It is covered by two tests, and it is related to one feature and one requirement.

    You can drill down to each of the related entities using its link.

Back to top

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.

Back to top

See also: