Share this page

# Generate MBT tests

Choose paths in the model to test based on your business objectives.

In this topic:

## Create tests

Create tests from the selected paths. You can generate tests only for paths that don't yet have test coverage. The tests are created as MBT tests.

To create tests:

1. Select paths in the grid that have no test coverage.

2. Click Generate Test.

3. Define the test name or use the default name.

Tests are created for the paths. The new tests are added to the path's Covered by test column.

The test scripts consist of the units included in the path.

Back to top

## Create a test suite

To run MBT tests, you need to assign them to a test suite. You can create a new suite if needed, or assign them to an existing suite. The test suites that a test is assigned to are displayed in the test's Preview pane.

To create a test suite:

1. In a model, select the Tests tab.

2. Select the tests that you want to include in the test suite.

3. Right-click the tests you have selected, and select Create test suite.

   If you have already created a test suite, you can add tests using the menu command Add to test suite.

4. Set the test suite attributes.

   In particular, we recommend that you provide a value for the Backlog coverage and Application modules attributes. In Backlog coverage, for example, you can specify which features are covered by this suite's tests.

To add tests to a test suite in the Quality module:

1. In a test suite, select the Planning tab.

2. Click Add Existing Tests.

3. Select the MBT tests you want to include, and click Add.

Back to top

## Configure test details

After you create a test, you can configure optional details and review the test script.

To configure test details:

1. In a test, open the Details tab.

2. Enter any optional information that you want added to the test, such as test type, tags to help with filtering, or related backlog items and application modules.

   The following custom fields can also be useful:

   Field | Description
   --- | ---
   Path | The names of the units that build the test path.
   Number of units | The number of units in the path.
   Is valid on model | This indicates if the model has changed and the test path is no longer valid.
   Testing tool type | Defines which automated testing tool executes the test.
   Test runner | Defines which test runner is used by the testing tool.

3. The Relations tab shows which items the test is automatically related to, including modules, units, and test suites. Click Add relation to link the test to a defect or requirement document.

4. The Script tab shows details regarding all the units that are included in the test, in the order that they are tested.

   In the Test path pane, you can see the path of all the units included in the test. The current test path is bold, while other paths are grayed out.

5. Select a unit in the Script tab to see its location in the Test path. A tooltip shows details of each unit, enabling you to click through directly to the unit.

Back to top

## Configure MBT tests

The test's Parameters tab shows all the parameters that are defined in the test's units. A unit can have both input and output parameters. For details, see Units.

You can merge parameters that have the same value. For example, a business analyst may identify that the parameter User in one unit has the same value as User name in another, and they can be merged.

You can also link between parameters, so that the value of one output parameter is used as the input value of the next input parameter.

In the Data set tab, you define the test data that is used when running the test, for each of the parameters.

To merge parameters:

1. In a test, open the Parameters tab.

2. Select each of the parameters you want to merge, and then click Merge.

   The original parameters are removed from the data set table. A new parameter is added named Merge <merge number>.

3. Click the new parameter name and rename it.

   You can see the pre-merge names in the Original parameters field. The Used by field shows all the units where the merged parameter is included.

4. Click a merged parameter to see all of its related units highlighted in the Test path pane.

5. If you need to undo a merge, select the merged parameter and click Split.

To link between output and input parameters:

1. In a test, open the Parameters tab.

2. Select an output parameter that you want to link.

3. Select one or more subsequent input parameters, and click Link.

   A link icon now appears next to the input parameter, and its Source field now contains the name of the output parameter it is linked to.

   Note: You cannot link between an early input unit and a subsequent output unit.

4. If you need to undo a link, select the input parameter and click Unlink.

To create a data set:

1. In a test, open the Data set tab. This contains a table where each column represents a parameter in the test, and each row represents an iteration of one set of data to be used in the test.

2. Enter the data you want to use in the test's parameters.

   Alternatively, access the More > Import Set menu command, and select a data set that you have saved in csv format.

   When you run the test, each row in the table is used in one test run. For example, if you have 10 rows the test runs 10 times.

Back to top

See also:

- Run tests
- Test coverage strategy

https://admhelp.microfocus.com ALM Octane 8942
Tips to improve your search results... ALM Octane Help Center ALM Octane Help 23.4-24.3 All View Local Help Center View Online Help Center Version: