This plugin integrates Micro Focus products with Jenkins. Using the plugin, you can create and use virtual services, run Performance Center or LoadRunner performance tests, run UFT functional tests, run tests in your lab, and run tests on mobile devices. This plugin also lets you upload test results to ALM. In addition, ALM Octane users can track and trigger Jenkins pipelines from within the user interface.

Jenkins versions

Beginning version 5.5, this plugin will only support the latest five LTS versions of Jenkins (currently 2.89.4). This is a result of the Jenkins policy to no longer support older update centers. Jenkins now requires you to have Java 8 installed on the machine. To recover any information lost during an upgrade relating to package names, backup the Jenkins folder and then run the Rebranding script.

This plugin is open source. If you identify any issues or want to submit enhancement requests, please use JIRA. The component for this plugin is the hp-application-automation-tools-plugin component. Your feedback and involvement will allow us to stabilize and enhance the capabilities of the plugin. The latest, early access, beta versions of this plugin are available here.

ALM/Quality Center client installed the machine that will run the tests. To check if you have a client installed, follow the instructions on this page: http://<your_server>:8080/qcbin/TDConnectivity_index.html

For running UFT tests from ALM install the ALMClient in common registration mode by accessing the following link from an Internet Explorer browser on the UFT machine: http://<almserver>:8080/qcbin/start_a.jsp?Common=true

For running file system scenarios with LoadRunner or UFT you need to set up a node in Jenkins. For details, see Create an execution node.

For building and tracking pipelines on ALM Octane:

JQuery Plugin 1.7.2-1 or later (Required to enable the integration)

A plugin that enables publishing test results. For example, JUnit Plugin 1.10 or later, NUnit plugin, and so on (Required to enable ALM Octane to collect your automated test results.)

For ALM Octane integration with UFT:

Jenkins Git plugin (version 2.4.4 or later)

User Guide

You can run client side-or server-side (Default or Functional) test sets and build verification suites from Application Lifecycle Management (ALM) or functional tests from the file system. You can create and configure ALM Octane pipelines from the ALM Octane user interface, or on Jenkins.

Rebranding script

Due to rebranding in this version of the plugin to the "Micro Focus" name, certain job history and configurations from previous jobs may be not be recognized by Jenkins. Before you use this version of the plugin, back up all projects and jobs, and all job configurations related to the plugin that are included in the General Jenkins configuration. Run the following job to convert your earlier configurations:

Create a new Free-Style project.

Click Add build step and select Fix old Micro Focus Jenkins builds.

Run the job.

Restart the server after the build status is successful. You can restart the server by entering the following URL: Jenkins_URL/safeRestart

Create an execution node

Creating an execution node is only required when running scenarios from LoadRunner or UFT, that are stored on the file system. You only need to set an execution node if the Jenkins master machine is not the executing machine. If you are running LoadRunner/UFT on the master machine, you do not need to set and select a node.

Go to the Jenkins Server home page.

Click the Manage Jenkins link in the left pane.

In the Manage Jenkins Page click Manage Nodes.

Click New Node.

Enter a Node name, select Permanent Agent, and then click OK.

In the next screen, enter information in the required fields. Enter the full path of the Remote Root directory, to which the tests results will be saved.

Provide one or more labels for the node. Separate the values with a space. Through these labels, you will be able to identify the nodes used in the job.

In the Usage area, select Only build jobs with label expressions matching this node.

Click Save.

Connect the execution node to the Jenkins server as described below.

Connect an execution node to the Jenkins server

On the computer that you defined as an execution node, open a browser and go to the Jenkins Server home page.

Open Manage Jenkins > Manage Nodes.

If there is a warning mark adjacent to the node you want to connect, click the node's link. You are prompted to connect the agent to Jenkins.

Click Launch to download the agent and then run the downloaded agent. Alternatively, use one of the other methods suggested on the screen.

Support for Pipelines

Generate pipeline code

To set up a pipeline test job for your Micro Focus testing tool:

From Jenkins Dashboard. click New Job or select an existing one.

On the page that opens, enter a job name (for a new job), click Build a Pipeline project, and click OK.

In the Project Configuration page, scroll down to the Pipeline section.

Configuration for Java Web Start clients

Add the following to the JVM options text box – “-Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8”.

Restart your Jenkins master, node, and slave.

Verify that your changes took effect:

For the Master: Go to Manage Jenkins -> System information -> “file.encoding”, “sun.jnu.encoding”. The value should be “UTF-8”.

For the node/slave: On the master machine, go to Manage Jenkins -> Manage Nodes.Click on the relevant node or slave and select System information-> “file.encoding”, “sun.jnu.encoding”. The value should be “UTF-8”.Workaround: If you find that the slave machine still does not support localized encoding, launch the slave from the command line as shown in the image below:

Tips and Troubleshooting

Integration Issues

If your job includes UFT, QTP, or Service Test tests running on a remote ALM/QC machine (run mode = Run Remotely), you should manually stop the test execution.

When UFT is installed on the slave machine (node), the LoadRunner test job will fail in the Analyze Result stage. Workaround: Add the path of the LoadRunner bin folder (%LR_PATH%/bin) to the PATH environment variable.

Content Security Policy Header

Starting with version 1.641 (or 1.625.3), Jenkins introduced the Content-Security-Policy header. This prevents some of the links that appear in the integration to become inoperable. For example, the links to the LoadRunner Performance and UFT HTML reports will not work.

For workarounds to enable viewing UFT HTML Reports, see the UFT Help Center.

Workarounds to enable viewing LoadRunner Performance reports:

View the reports locally on the slave machine, in your Jenkins results folder under the relevant build ID, or on the master machine in the Jenkins builds folder. Go to the %jenkins% \jobs\<job_name>\builds\<job_count>\PerformanceReport folder. For example, C:\Program Files (x86)\Jenkins\jobs\Plug_Debug\builds\5\PerformanceReport\index.html.

Click Manage Jenkins > Script Console, and run one of the following scripts from the console:

Balraj Goel I would suggest updating your plugin version first to the latest one, if that didn't help please create a JIRA issue so we could help you properly. And don't forget to run Rebranding Script in order to recover any lost configurations.

I set up a new Jenkins server 2.138.1( previous server had Jenkins version 1.7, micro focus plugin 4.0.1) and installed this plugin version 5.5 to integrate our Load Runner scripts with jenkins. We are using dsl scripts to build all Jenkins jobs. Somehow my dsl job doesn't create a build step for Performance Center anymore and I see no specific error messages anywhere. Maybe url for API changed, or this new version of plugin requires me to update code. On my old server this script works just fine. Here is part of groovy script which isn't working anymore. Other steps related to Bitbucket/scm and post build work okay.

One of my colleagues has asked me whether it is possible to pass environment strings to Performance Center tests using the Jenkins plugin. If we were able to do this we could determine the environment where our code is being deployed and then direct the test scripts to run against that environment. By doing this we could avoid the need for multiple versions of scripts (where only the target URLs) change.

Currently we are using lr_save_string(lr_get_attrib_string("env"),"site"); function in all ourscripts to specify the environment we usethe Command line option in PC scenario setting to set the environment ( example: -env NFT01B ) globally across all the scripts.

Is there any way we can make our plugin to take the environment info from Jenkins and pass it to our scenario global command line option / global run-time settings?