By Michael Deveaux
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).
- To install and set up Jenkins, please see the Jenkins Wiki.
- To install the Application Tools plugin, see this link: Micro Focus Application Automation Tools
- For details on accessing UFT and UFT tools and files in Windows 8.X or higher and Windows Server 2012, see Accessing UFT in Windows 8.X or Higher Operating Systems.
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.
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.