Using Jenkins to Execute Tests Built with Micro Focus UFT and LeanFT

Increasingly, I am seeing companies use Jenkins to execute tests for UFT and/or LeanFT, two automated testing tools from Micro Focus (formerly HPE) that can accelerate quality and release cycles compared to manual testing. This is a sensible approach, given that UFT and LeanFT, when run with Jenkins, can streamline the continuous integration/continuous delivery pipeline. (Learn more about both products at https://software.microfocus.com).

However, since companies have so many different network configurations, I find that settings may need to be changed before Jenkins can execute UFT and/or LeanFT tests – whether stored in the file system or in Micro Focus ALM. The installation setup may also require other settings to be changed, depending upon company policies and network security setup.

Although many of these instructions are available online, they are not aggregated in a single instruction set, and with Micro Focus’ acquisition of HPE, users may not know where to find them within the Micro Focus libraries. Furthermore, a bit of additional clarity may help users enjoy greater benefit from Jenkins with their UFT and/or LeanFT tests.

Over the course of the next few weeks, I will offer setup advice for preparing the test environment in a variety of scenarios, including setting changes that my test environment required. You may identify other changes necessary for your environment. If you find something that might benefit others, please include details in the blog comments.

This week, let’s get started with setting up the Jenkins Execution Nodes.

To run UFT/LeanFT tests from Jenkins, install Jenkins and the Micro Focus Application Tools plugin. (Note that prior installations of this plugin may be branded HPE).

You may also need to run UFT’s Additional Installation Requirements. Go to Start > All Programs >Micro Focus >  Micro Focus Unified Functional Testing > Tools > Additional Installation Requirements or <UFT installation folder>/bin/UFTInstallReqs.exe. Right click on ‘Additional Installation Requirements’ and click ‘Run as Administrator.’ Uncheck “Run License Installation Wizard”, “Run Stingray Wizard” and “Run the Terminal Emulation Wizard” (if present) but check everything else. Click RUN.

Setting up Jenkins Execution Nodes

Creating an execution node is necessary to run UFT tests.

From the Jenkins Dashboard:

1. Click Manage Jenkins
2. Click Manage Nodes
3. Click New Node

  • Name the Node
  • Choose Permanent Agent
  • Click OK

4. Set up the Remote Root Directory, which is where test results will be saved. This can be any directory of your choosing. I created a special directory as C:\Jenkins.
5. In the Usage field, choose “Use this node as much as possible”
6. In the Launch Method, choose “Launch agent via Java Web Start”
7. For Availability, choose “Keep this agent online as much as possible”
8. Click Save
9. At this point, you’ll have to choose how to launch the Jenkins agent on the “slave” machine. I chose “Launch agent from browser.”

When you click the Launch button, you’ll get a dialog asking to save the slave-agent.jnlp file. Save this file in a location accessible from the “slave” machine. Note that this file is customized for the particular slave machine that the node was created for. You can’t use the same file on different machines.

10. Launch the agent on the slave machine. From the agent, you can click the File menu and choose to install the agent as a service. This is convenient because it will always run when the system starts and you don’t have to manually launch it. (Note: on some machines the service is not reliable, so just running the agent may be a better option for some environments.)

Once this is complete, you can go back to the Nodes management screen in Jenkins and the new slave machine should be listed and connected. You should now be ready to run tests on the nodes you created.

Summary

Using the above procedures, you will be able to set up Jenkins to run UFT and LeanFT (UFT Pro) tests, whether they are stored on the file system or in ALM. You will also be able to view the results of the tests.

As mentioned previously, these procedures are basic steps to run tests from Jenkins. Depending on your situation, you may need to change some settings or accommodate security requirements in your network or test environment.

In next week’s article, I will begin providing the instruction sets for running these tests.

By Michael Deveaux

Michael has been a Technical Support Engineer with Orasi since November of 2012, focusing on supporting customers with QTP, UFT and UFT Pro (LeanFT) issues. Prior to coming on board with Orasi, Michael has over 12 years of functional testing experience utilizing WinRunner, QuickTest Professional and Unified Functional Testing.

3 comments

  1. Hi Michael, thank you for your article. Very useful!

    We are building CI/CD pipeline and using LeanFT with NUnit framework for automated testing. We have a dedicated Windows server for Jenkins and all the necessary plug-ins to run the job. Unfortunately, we experienced an unforeseen problem. Compiled scripts run on the Jenkins box via command line, but failing when executed from Jenkins. We are trying to utilize one server for building and executing the job. Your article talks about Jenkins master/slave configuration. Is it possible to do it with one box (Jenkins server)?

    We are under deadline pressure and I truly appreciate your quick reply!
    P.S. I have logs available if needed.

Leave a comment