Using Jenkins to Run and View UFT Tests in ALM
As a follow-on to our recent post about setting up Jenkins to execute tests built with Micro Focus UFT and LeanFT, this article will outline the process for running and viewing UFT tests in Micro Focus ALM. (See Running Test Sets from ALM on the Jenkins Wiki for additional information.)
After setting up the slave nodes you’ll be using to run tests, you also need to set up Jenkins to kick off tests that reside in ALM.
Adding ALM Server information to Jenkins
- From the Jenkins dashboard, click Manage Jenkins
- Click Configure System
- Scroll to the Application Lifecyle Management section
- Enter the ALM Server name
- Enter the ALM Server URL as http://<server name or ip>:8080/qcbin
- If you have multiple ALM servers, you can add more by clicking Add ALM Server
- Click Save.
You are now ready to use Jenkins to run tests stored in ALM.
Running UFT tests in ALM from Jenkins
- From the Jenkins dashboard, click New Item
- Enter an appropriate job name
- Choose Freestyle Project and click OK
- Check the “Restrict where this project can be run” box and enter the node on which you want to run test
- In the Build section, click “Add build step”
- Choose “Execute Micro Focus* functional tests from Micro Focus* ALM”
- Choose the ALM Server
- Enter the ALM User Name and Password for the user that will be running the test set
- Enter the ALM Domain and Project
- Enter the full path to the test set(s), including the Root folder. It should look something like:Root\testfolder1\testset_a
- Click apply
- In the Post-build Actions section, click “Add post-build action”
- Choose “Publish Micro Focus tests result”
- For the “Report archive mode” there are several options. Choose the one appropriate for your use. I typically choose “Always archive Micro Focus* test reports”
- Click Save.
*In some versions of Jenkins, the option may say HPE rather than Micro Focus.
Viewing the results of UFT tests run via Jenkins
UFT jobs run from ALM:
- From the dashboard, click on the job.
- Click the Console Output link to view the ALM information.
- Copy the ALM link to your Internet Explorer browser that has access to ALM and view the Test Set results from within ALM. The link will look similar to this:td://Sandbox.DEFAULT.10.0.2.50:8080/qcbin/TestLabModule-000000003649890581?EntityType=IRun&EntityID=79
- The link will take you to the Test Lab in ALM. You may have to drill down into the test sets to find the test and link to report. I have found it easiest to simply click the Test Runs tab then find and click the Run ID (in my link it is 79) to get to the report.
Using the above procedures, you will be able to run UFT tests in ALM and view the results of the tests. These procedures are basic steps to run tests from Jenkins. Depending on your situation, you may need to change some settings or accommodate for security in your network or test environment.
Using Jenkins to execute your UFT and LeanFT tests is a great way to enhance your CICD pipeline. In our next article, we will discuss Running LeanFT Tests with Jenkins.