MBT lifecycle
In the Model-Based Testing lifecycle, you create a model built from units. You then generate paths to test based on a testing strategy, and run your tests accordingly.
Step 1: Create a model
Business analysts and QA leads work together to create a comprehensive model of the business processes run by the application.
This model is built out of units, and each unit corresponds to a single automated test script. For example, one unit can be Log in, another can be Search for item, and another can be Pay with credit card.
There are two ways to work with MBT:
-
Build a model using placeholder units, and then create test scripts in a testing tool such as UFT One. You can then associate each placeholder with a test script.
-
Create tests in a testing tool such as UFT One and save them in your Git repository. MBT can automatically discover tests in Git, and create auto-discovered units for these tests. You can then use these units to build a model.
In addition, if you define requirements and features in MBT, you can associate a model with related features or requirements. This can help you to ensure that new features or requirements are properly covered in testing.
Tip: You can also import a BPMN file to inject its model into MBT, as described in BPMN integration.
Step 2: Generate paths to test
After building a model, you need to decide on a testing strategy that defines which paths in the model to test.
For example, you might want to focus testing on closed defects. In this case you would test the paths that contain units where defects were recently closed, to ensure that defect fixes did not have unintended consequences.
When you select a testing strategy, MBT automatically creates a comprehensive list of all the paths along the model that should be tested, based on that strategy.
Each path represents a list of test scripts that should be run in a specific order.
Step 3: Create and run tests
From the list of paths generated by your testing strategy, choose one or more paths to test. When you select a path, you can see a visual representation of the path to understand which units will be tested.
Each path is converted to an MBT test entity. You then assign the relevant test data for each MBT test. For example, you might run multiple iterations of a test using different user and password combinations.
You then assign one or more MBT tests to a test suite. When you run a test suite, each iteration of the test using a particular set of test data is a single test run.
MBT can run a test suite either using a testing tool such as UFT One, or UFT Codeless. You then view test results in MBT.
See also: