UFT One tests as MBT units

This topic describes the configuration required to use UFT One tests as units in Model-Based Testing, and run them on Jenkins machines.

Overview

This topic describes how to set up an integration with Git and Jenkins to run MBT tests with UFT One-based units.

  • When you create a Test Runner with an MBT framework, the Git repository you configure is mirrored, creating an MBT unit for each test in the repository. Any changes you make in Git, are immediately reflected in the mirrored repository.

  • After you include the MBT units in a model and generate MBT tests, you can run those tests on Jenkins agent machines running UFT One.

When working with OpenText Core Software Delivery Platform, you can also run MBT tests with UFT One-based units directly on the OpenText cloud.

To run on the cloud, use a Cloud Runner and specify the Git Repository path where the test scripts are stored. The tests are retrieved and synchronized with Git at configured intervals, as opposed to direct mirroring of the repository. For details, see Cloud runners for Automated tests.

Back to top

Step 1: Upload scripts to a Git repository

Upload your UFT One scripts to a Git repository. This repository can be any Git-compliant system, whether on-premises or in the cloud.

Note: The ADM Jenkins plugin requires that the Git default branch be named master.

The UFT One scripts can reside in any directory level below master.

Back to top

Step 2: Create an API key

Generate a dedicated API key to secure the connection between Jenkins and MBT.

You generate the key for CI/CD Integration. The user performing this operation must have space admin rights.

To create an API key:

  1. Open the Settings menu , click Spaces, and select a space.

  2. Select the API Access tab.

  3. Click the API access button to add a new API access key. Enter a name for the key, select the CI/CD Integration role, and select one or more workspaces for the key.

  4. Click Add. The access key information is displayed.

    Note: For security reasons, the key information will never be displayed again, so you must record it for future use.

For more details on API access, see the OpenText Core Software Delivery Platform Help Center.

Back to top

Step 3: Configure the Jenkins plugin

For Jenkins to work with MBT, install and configure the Application Automation Tools plugin.

To install and configure the plugin:

  1. In Jenkins, download and install the latest version of the plugin. For details, see Application Automation Tools plugin.

  2. After you install the plugin and reboot Jenkins, open Manage Jenkins > Configure system. In the ALM Octane CI section, add a new server and enter the following information:

    Field Information to enter
    Location

    The full URL presented to you when you access MBT in OpenText Core Software Delivery Platform.

    Client ID From the API access key.
    Client Secret From the API access key.
    Jenkins User

    The Jenkins user that runs the MBT jobs.

  3. Click Test Connection to make sure Jenkins connects with MBT.

Back to top

Step 4: Set up the Jenkins integration

Set up Jenkins connectivity from the MBT side, and define an MBT runner and release.

  1. Open the Settings menu , click Spaces, and select a workspace.

  2. Select the DevOps tab.

  3. Open the CI Servers section and click the CI Server button to add a new CI server.

  4. Enter a name for the CI server, and select your Jenkins server from the CI Server list.

    Note: If your Jenkins server is not listed, either the Jenkins side is not defined correctly (Test Connection on Jenkins has failed), or this Jenkins server is already used by another MBT CI Server setup.

Back to top

Create the MBT Test Runner

Create a Test Runner with the MBT framework. This runner creates units based on the tests in Git, and runs the MBT tests you create with these units on Jenkins.

To create an MBT Test Runner: 

  1. Open the Test Runners section and click the Test Runner button to add a new test runner.

  2. Define the following:

    Field Information to enter
    Name

    A name for the runner.

    Framework MBT
    CI Server

    The CI server that you added. This CI server runs the MBT tests.

    Repository

    The URL of the Git repository in which your test scripts are stored. This repository is mirrored as soon as you create the runner.

    User name and Password

    The credentials needed to connect to the Git repository (read-only access).

    Click Test Connection to validate that all settings are correct.

  3. Open the workspace Releases tab and make sure that at least one release is defined, as MBT requires each test run to be associated with a release.

Back to top

See also: