UFT One and Jenkins

Run UFT One tests from your local file system, ALM, or ALM Lab Management as part of your Jenkins continuous integration process.

You can use either a Jenkins freestyle project or a pipeline to run UFT One tests. This topic describes how to integrate UFT One with Jenkins to run your UFT One tests.

Set up your Jenkins server with the Application Automation Tools plugin

Set up your Jenkins server to run UFT One tests.

Do the following:

  1. Install Jenkins and the Application Automation Tools plugin. For details, see the Jenkins plugin page.

  2. From the Jenkins Server home page, click New Item, or select an existing one.

  3. On the page that opens, enter an item name for the new job, select Freestyle project or Pipeline, and click OK.

    For the supported pipeline job types, see the Jenkins plugin page.

Note:  

  • Due to Jenkins' security policy, when you upgrade the plugin to version 6.8, Jenkins may remove the build steps of the plugin.

    Workaround: Recreate the build steps using Application Automation Tools plugin 6.8 or higher.

  • We recommend that you always clear your browser cache when you upgrade or downgrade the plugin.

  • The Jenkins job settings always take precedence over the Record and Run settings defined for your UFT One tests.

Back to top

Select execution nodes for your job

Select one or more execution nodes for the test runs in this job.

Do the following:

  1. In the General section of your Jenkins job, select This project is parameterized.

  2. Select Add Parameter > Node, and enter or define the following Node options:

    Name Define a name for your node definitions.
    Default nodes

    Select one or more default node to use when the job is triggered by an outside process.

    Possible nodes

    Select one or more node to use when the job is built manually.

    Build options

    Select one of the following options for node selection when triggering a build:

    • Run next build only if build succeeds

    • Run next build only if build succeeds or is unstable

    • Run next build regardless of build result

    • Allow multi-node selection for concurrent builds. Required for jobs configured with the Execute concurrent builds if necessary.

      When configured, the build is executed on all selected nodes in parallel. Ensure that all selected nodes are online before you build this job.

    • Disallow multi-node selection when triggering build manually. Select this option to enable users to select a build node when they trigger a build.

    Node eligibility

    Select how to handle nodes that are offline or temporarily offline.

    • All Nodes. Trigger the job on all selected nodes, regardless of their online/offline state.
    • Ignore Offline Nodes. Trigger the job only on nodes that are online and have an available UFT One instance to run the test.
    • Ignore Temp Offline Nodes. Trigger the job on all selected nodes, except those currently marked as offline.
    Description Define a description for your node configuration.

Note: If you configure failure scenarios, the node configured here must match the one selected in the failure scenario.

For more details, see Configure failure scenarios for your test runs.

Tip: The UFT One Application Automation Tools plug-in supports a variety of methods for defining nodes for your job. This topic describes one of the most commonly used and recommenced procedures.

For more details, see Create an execution node on the Jenkins plugin page.

Continue with one of the following:

Back to top

Data security in UFT One's Jenkins tasks

This section describes the security mechanism provided to secure your Jenkins builds and some practices you can use to protect your data.

Secure Jenkins builds

During the build process of a freestyle or pipeline job, the credentials you defined on the Jenkins server or your test data may be accidentally exposed. To prevent such risks, the Application Automation Tools plugin for Jenkins uses keys to secure the sensitive data you may include in your test in a build process.

Application Automation Tools plugin version How credentials and secrets are secured
Earlier than version 7.4 A common shared key is used for both encryption and decryption on all execution nodes.
Version 7.4 and later

A public-private key pair is used to encrypt and decrypt sensitive data on each execution node during the build process, and a 256-bit master key on the server encrypts all private keys on the nodes. This mechanism offers better security.

Both the public-private key pairs and the master key are automatically generated once you install the plugin. However, if they are exposed unexpectedly, you can always regenerate them.

  • To regenerate a public-private key pair for a node, do the following:

    1. In Manage Jenkins -> Manage Nodes and Clouds, select and click a node.

    2. In the left-hand menu on the node details page, click Configure. Then on the configuration page, deselect the Encryption for UFT sensitive data option.

      The public-private key pair will be regenerated the next time you run a job on this node.

  • To regenerate a master key for the server, do the following:

    1. Go to the Jenkins installation directory on your Jenkins server.

    2. Delete the com.microfocus.application.automation.tools.settings.UFTEncryptionGlobalConfiguration.xml file.

    3. Regenerate a public-private key pair for all nodes on which your job will run. For details, see UFT One and Jenkins.

    Note: If an illegal key size error occurs during the build, check whether your Jenkins server runs on a Java version that does not implicitly allow arbitrary key sizes for AES encryption. This behavior can be modified by upgrading certain security policies.

Data security practices: Encode passwords in test run results

Test run results of Jenkins builds are displayed in the following places on the Jenkins UI: Console Output, Test Result, and UFT Report.

In Application Automation Tools plugin version 7.6 and later, you can obfuscate the values of your Password parameters in the test run results. This ensures data security and prevents the passwords from being seen by unauthorized individuals.

  • To encode passwords on the Console Output and Test Result page:

    When specifying GUI test parameters of type Password on the Jenkins UI, make sure that these parameters are also defined as Password type in UFT One.

  • To encode passwords on the UFT Report page:

    1. Before specifying GUI test parameters of type Password on the Jenkins UI, use the Password Encoder tool to encode the parameter values.

    2. Then enter the encoded values in the parameter table.

    For information on how to use the Password Encoder tool, see Password Encoder Tool.

Back to top

Security precaution

Although any sensitive information is encrypted and encoded, Micro Focus encourages you to routinely remove unnecessary files generated by your Jenkins jobs, which are not removed by the Micro Focus Jenkins Application Automation Tools plugin.

These are the files located in the <Jenkins installation folder>\workspace\<job name> folders.

By not implementing the file removal you may expose your system to increased security risks. You understand and agree to assume all associated risks and hold Micro Focus harmless for the same.

It remains at all times the Customer’s sole responsibility to assess its own regulatory and business requirements. Micro Focus does not represent or warrant that its products comply with any specific legal or regulatory standards applicable to Customer in conducting Customer's business.

Back to top

See also: