Test coverage strategy

Select a strategy that automatically converts your business processes to paths.

Select a testing coverage strategy

A model can have a huge number of possible business processes. In the Paths tab you can select a strategy that automatically converts your business processes to paths. You can then generate tests for the paths. This helps you plan your testing according to your business objectives.

To plan your model testing using strategies:

  1. In a model, select the Paths tab.

  2. Click Coverage strategy. The Strategy and Constraints dialog box opens.

  3. Click the Coverage strategy drop down arrow, and select a strategy:

    Coverage strategy Description
    Full Coverage – Simple Displays the path combinations of all possible flows in the model. You can filter the paths by defining constraints in the same dialog box.
    Sanity Test Selects paths that cover all units in the model at least once. This ensures that each unit is tested at least once.
    Every Junction Combination

    Covers all possible entry and exit combinations of each decision point.

    The Optimized checkbox generates the smallest number of paths to include all entry and exit options. If you do not select this option, MBT creates a distinct path for each of the decision point options, ensuring greater coverage.

    Full Coverage - Agile Based

    You can combine MBT with your Agile work processes. For details, see Agile-based testing strategy.

    Full Coverage – Unit Recent Failure

    This strategy provides recommendations of paths that include units identified as potentially risky.

    MBT assigns a weight of 1 to each unit that experienced a failure in its last test run. You can then test paths with the highest weights, to cover the units that have the greatest degree of risk.

  4. Filter the paths further by using the fields in the Constraints section.

  5. Close the dialog box. The list of paths is filtered to reflect your strategy.

Back to top

Agile-based testing strategy

You can align MBT with your Agile processes to focus testing on specific backlog items.

To align MBT with your Agile processes, the system architect can create units that represent functional areas. When developers implement the functionality described in a unit, they can link user stories, quality stories, and defects to the appropriate unit. This describes the backlog item coverage for the units.

When you select the Agile-based testing strategy, MBT automatically calculates an aggregate weight value for each path, based on the weights of all of its units. The weight of a unit is the number of backlog items linked to the unit that are in Done phase, within a defined date range.

MBT testing examines start-to-end paths connecting units. When planning the quality testing for the model, you can define a testing strategy that prioritizes paths that are at higher risk. Such paths include units that were recently worked on.

To use the Agile-based strategy:

  1. In the Paths tab, click Coverage strategy. Select the Full Coverage - Agile Based strategy.

  2. Provide details for the following fields:

    Field Description
    Work item types Select which types of backlog items to consider when looking at recently worked-on items.
    Must include/ avoid units Specify units that you want to make sure to include or exclude from testing.
    Unit phases Filter for units in specific phases.
    Time selection Set a time period to include only those backlog items that were set to the "Done" metaphase within that time period.
    Releases/ Sprints/ Milestones Select the relevant entity to which backlog items are assigned.

Weight calculation

Each path has a relative weight. This helps you to prioritize the most important paths based on the Agile-based strategy. The strategy helps you decide which paths to test, based on the relative weights of the units in each path. Each linked item that is in phase "Done" adds to a unit's weight, as follows:

  • If a unit is associated with a defect, user story, or quality story, the unit gains one point in weight.

  • If a unit is associated with a user story, and that user story is associated with a defect, the unit gains one point in weight.

Back to top

Draw a path manually (optional)

You can manually draw your testing path to include specific units that you know are important to test based on your application needs.

To draw a path:

  1. In a model, select the Paths tab.

  2. Click Draw a path.

  3. In the Path Preview pane on the right side of the screen, click the units that you want to include in your testing path.

  4. Click Generate Test, and proceed as described below.

Note: If the path you drew already exists, a message is displayed. The generated test is added in the Tests tab, but the path is not added in the Paths tab.

Back to top

See also: