Share this page

# Units

A unit represents an actionable component in your model, such as Log in or Purchase. You combine units to create a model for testing.

In this topic:

## Unit overview

Each unit represents an action in your application. You create units for each action, and then build a model showing the possible flows between these units. To automate testing, each unit should correspond with a test in your Git repository.

Units can be created in the following ways:

Method | Details | Learn more
--- | --- | ---
Auto discovery | If you have tests already defined in Git, you can configure a connection to your repository. The units associated with the tests are automatically populated. | Retrieve UFT One tests
Manual creation | Create units in MBT, and then connect them with scripts in your Git repository. |
Import from file | Import a model from a BPMN or JSON file. | Integrations
Design | Use Functional Test Design to write test scripts for your units. | Integrations

A unit can be assigned to multiple MBT models and tests. If you modify a unit, the change is applied to all related tests and models.

Back to top

## Create a unit

This section describes how to create and configure a unit. The instructions on configuring units are also relevant for auto-discovered units.

To create and configure a unit:

1. Select a model folder in the MBT repository pane, or create a new model folder. This structure enables you to organize your MBT models and units in a way that is meaningful to you.

2. In the Units tab, click + Unit.

3. In the Details tab, enter the unit's name, and fill any other fields that are relevant. For example, we recommend that you configure the following:

   Field | Description
   --- | ---
   Automation status | Specify whether the test covering this unit is automated in your CI server. When you create an MBT test that covers this unit, the test indicates what percentage of the test's units are automated, helping you optimize your automation strategy.
   Repository path | If the unit has a corresponding test script in Git, enter the path to the test script in the repository that is defined in MBT settings. For details, see Retrieve UFT One tests. Do not enter the full path to the test script, but only the relative path inside the repository. For example, if a test is located inside <Git repository URL>/UFTtests/Action1, the Repository path is UFTtests/Action1:ActionName. Note: When you use auto-discovery to populate units, each unit is automatically assigned a test runner on creation based on its Git URL. You can then see the unit's runner using the optional Test runner field. This helps ensure that all units in a path use the same test runner.
   Testing tool type | Define the testing tool that will be uses to run the automated script.
   Priority | You can add the Priority field if needed. If you choose High or Low priority, this is indicated on the unit's card and in the preview pane.
   Phase | In the upper right corner of the UI, select the Unit'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 unit's phase to Ready, the icon representing the unit changes color from gray to blue.

   Note: For details on working with options in the form such as auto-fill, attachments, or custom fields, see Basics.

4. (Optional) In the Parameters tab, click + Unit Parameter to create input or output parameters for the unit.

   For example, you could have a unit whose function is to search for a book. The input parameter is the book title, and the output is the book's internal item ID. This parameter can then be the input parameter in the next unit in your model, which takes the item ID as input, and generates a price as its output parameter.

   1. For each parameter, define the following:

      - Type. Enter either Input or Output.

      - Name. Enter a name for the parameter.

      - Default value is optional.

   2. When parameters are used in a UFT One action or Selenium test, the following are required:

      - The parameter name must be identical in MBT and in the testing tool. To rename a parameter, click on the parameter name and edit as needed.

      - The order of the parameters in the unit must be identical in MBT and in the testing tool. To reorder parameters, select a parameter and click Up or Down in the toolbar.

Back to top

See also:

- Models
- Generate MBT tests

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: