Set up UFT integration

This topic explains how to integrate ALM Octane with UFT via Jenkins. This integration enables ALM Octane to reflect the UFT tests from your Source Code Management (SCM) repository as executable automated tests. You can then include and run these UFT tests in test suites.

ALM Octane-UFT integration flow

Once the UFT integration is set up, Jenkins and the SCM system are transparent and you can work with UFT and ALM Octane directly: 

  • Create and edit your tests and their data tables in UFT and save them in a Git or SVN repository.
  • Run the tests and track their results in ALM Octane.

The ALM Octane-UFT integration flow includes the following:

Set up. To set up the integration, create a CI server and a testing tool connection in the ALM Octane settings. This process is described in the sections below.

ALM Octane discovers UFT tests and data tables. ALM Octane creates automated test entities to represent the GUI and API UFT tests stored in your repository.

ALM Octane periodically checks for changes in the repository.

Associate tests with ALM Octane entities. Associate the tests with your backlog and application modules. This helps you use the test run results in ALM Octane to track your product and release quality.

Run tests. Include the tests in test suites to plan and run them from ALM Octane. ALM Octane triggers the test runs via the CI server. The tests run on UFT machines configured as Jenkins execution nodes.

Analyze release and product quality. Track the UFT test results as part of the overall data in the backlog, quality, and dashboard modules.

The image below summarizes the architecture of this integration:

Back to top

Before you set up the integration

Set up UFT to store tests and data tables in a Git or SVN repository. For details, see the UFT Help Center.

Note:  

  • UFT-SCM integration is supported for UFT 12.50 and later.
  • For ALM Octane to locate the data tables in your repository, store them in an entirely separate folder from your tests.

Set up a Jenkins server configured with an SCM plugin:

  1. Install a Jenkins server. You do not need to configure a full CI system for this integration. Configure only the area described below.

    For the CI servers that are supported by the ALM Octane CI plugins, see CI Servers.

    For a list of plugins that must be installed on the Jenkins server to enable ALM Octane integration, as well as plugins that are supported by the ALM Octane integration but not required, see Application Automation Tools wiki page.

  2. Install the Jenkins Git plugin (version 2.4.4 or later) or the Subversion plugin (version 2.5 or later) to create the Jenkins-SCM integration.

Back to top

In Jenkins, set up the connection to ALM Octane

  1. Install the Application Automation Tools plugin.

    This plugin supports ALM Octane-Jenkins integration and enables Jenkins to run UFT tests.

    If your tests are stored in ... Use this version of the plugin

    Git

    5.2 or later
    SVN 5.3.5 (beta) or later
  2. Configure the plugin to connect to ALM Octane. For details, see Install and configure the ALM Octane CI plugin on your CI server.

    Tip: Before configuring the plugin, obtain an API access Client ID and Client secret from your space admin. For details, see Set up API access.

You do not need to create pipelines in ALM Octane or create any jobs in Jenkins.

Back to top

In ALM Octane, add your Jenkins CI server

  1. In ALM Octane, click Settings , select Spaces and select a workspace.

  2. Select the DevOps > CI Server tab.

  3. Add a CI server and select your Jenkins server's URL.

For more details, see Add CI servers on ALM Octane.

Back to top

Create a testing tool connection in ALM Octane

  1. In ALM Octane, click Settings , select Spaces and select a workspace.

    Tip: You can only define one testing tool connection per workspace.

  2. Select the DevOps > Testing Tools tab.

  3. Click + Connection.

  4. Select your Jenkins server.

    The list displays all servers that meet the following conditions:

    • The server has the ALM Octane CI plugin installed and configured to access your ALM Octane.

    • The API Access keys that the plugin is using are assigned the CI/CD Integration role in the current workspace.

  5. Specify the type and URL of the SCM repository that contains your UFT tests and data tables.

  6. Provide the authentication details for your repository.

  7. Click Test Connection to make sure the configuration is correct.

  8. Click Save and Connect to complete the connection.

ALM Octane creates a Jenkins job that connects to the repository and discovers the UFT tests and data tables.

Tip: If necessary for troubleshooting, you can find this job on your Jenkins server based on the connection ID.

The test scripts and the data table content are available in UFT only.

In the automated test entities in ALM Octane, the following fields are set:

  • Testing tool type = UFT

  • Test type = API or UI

  • Executable = Yes. These tests can be added to test suites and run from ALM Octane.

ALM Octane continues to periodically check the repository and update its entities accordingly.

  • If you add a new test in UFT or change an existing one, the changes are reflected in ALM Octane.

  • If you delete a test from UFT, the relevant test in ALM Octane is not deleted but is marked as not executable. This way, the test and its history, runs, and reports remain available.

If you do not see all of the expected tests in the Tests tab in ALM Octane, try refreshing the list of tests.

Assign the tests to your backlog and application modules

Assign tests to the backlog and to application modules to include them in your release and product quality tracking. For example, you can check test coverage even before you run the tests. For details, see Assign tests to application modules and backlog items.

Back to top

Setup Jenkins and UFT so Jenkins can trigger UFT test runs

This section describes configuration required on your UFT machine and on Jenkins, to enable Jenkins to run UFT tests.

Make sure UFT can run your tests

  • When UFT opens, it must load all of the add-ins required for your tests.

  • The UFT machine must be able to access the application under test.

Configure UFT to enable running tests over a disconnected remote connection

This configuration is required if you are using execution nodes to run the UFT tests. Without this configuration, test runs triggered by ALM Octane will remain Pending on Jenkins until someone logs in to the execution node either directly or with a remote desktop connection.

To configure:

  1. In the UFT Options dialog box, open the Run Sessions pane (Tools > Options > General tab > Run Sessions node).

  2. Select Allow UFT to continue running GUI or business process tests after disconnection from an RDP computer.

  3. Enter a user name and password of a user who can log in to the UFT machine.

Connect Jenkins to your UFT machines

  1. On your Jenkins server, define your UFT machines as execution nodes. Jenkins will use these nodes to run UFT tests that ALM Octane triggers.

    Make sure the names of your execution nodes include the string uft.

  2. On the UFT machine, connect the execution node to the Jenkins server:

    Open the Jenkins server URL in a browser, go to Manage Jenkins > Manage Nodes.

    Select the node, click Launch to download an agent program from the server to the execution node, and then run that program on the UFT machine.

For details, see the section on execution nodes in the Application Automation Tools wiki page.

Note: If your Jenkins server is installed on a Windows machine, you can install UFT on the same machine instead of creating execution nodes.

Set up Jenkins to enable running UFT API tests

Relevant if you are working with a UFT version earlier than 14.01.

To run API tests, ALM Octane needs the Script.dll and Script.pdb files that UFT generates when it first runs the test.

By default, these files are not stored in the SCM repository.

To make these files available to ALM Octane:

  1. Run the API test in UFT to generate the files.

  2. Adjust your SCM definitions so Script.dll and Script.pdb are not ignored.

  3. Push (Git) or commit (SVN) the tests from UFT to save the files in the repository.

  4. Verify that the Script.dll and Script.pdp files are now in the repository.

Set up Jenkins to enable opening the UFT tests result from ALM Octane

By default, Jenkins' Content-Security-Policy header prevents viewing UFT test results reports remotely.

To enable opening UFT reports from ALM Octane using the Testing tool report button in an automated test, you must clear the CSP property.

Implement one of the following workarounds:

  • Clear the property temporarily, until the next time the Jenkins server restarts:

    In Jenkins, open Manage Jenkins > Script Console, and run:

    System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")

  • Clear the property permanently:

    Run Jenkins with JAVA_OPTS option and add the following option: 

    -Dhudson.model.DirectoryBrowserSupport.CSP=

Back to top

Next steps: