Running LeanFT Tests with Jenkins

Over the past few weeks, I have been introducing Eye on Quality readers to some of the protocols for running LeanFT (UFT Pro) and UFT tests with Jenkins. (Learn more about both products at https://software.microfocus.com). Using Jenkins to execute your UFT and LeanFT tests is a great way to enhance your CICD pipeline. Today, I’ll share instructions for running LeanFT tests with Jenkins.

To read the earlier articles in this series, click the links below:

Note that the purpose of this article is not to cover every scenario, but rather to review basic set up including a few potential setting changes that I discovered I needed in my test environment. You may need to make other changes necessary for your environment. If you find something that might benefit others, please include details in comments.

LeanFT jobs run from file system

  1. From the Jenkins dashboard, click New Item
  2. Enter an appropriate job name
  3. Choose Freestyle Project and click OK
  4. Check the “Restrict where this project can be run” box and enter the node on which you want to run the test
  5. In the Build section, click “Add build step”
  6. Choose “Execute Windows batch command”
  7. Enter the command that will run your test runner (for this example, I’m using NUnit). The first part of the command is the path to the test runner, and the second part is the path to the test executable file (in this case a .dll since I used .Net for this example). The command line will look similar to this:
    “C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe” “C:\LeanFT-Tests\Advantage-Shopping\Advanced_Shopping_Tutorial.dll”

There are several other options you can perform with Jenkins. Please refer to the Micro Focus Community (registration required) and search under Integrating LeanFT With Jenkins for additional information.

LeanFT jobs run from ALM

  1. From the Jenkins dashboard, click New Item
  2. Enter an appropriate job name
  3. Choose Freestyle Project and click OK
  4. Check the “Restrict where this project can be run” box and enter the node you which you want to run the test
  5. In the Build section, click “Add build step”
  6. Choose “Execute Micro Focus* functional tests from Micro Focus ALM”
  7. Enter your ALM server information
  8. Choose the ALM Server
  9. Enter the ALM User Name and Password for the user that will be running the test set
  10. Enter the ALM Domain and Project
  11. Enter the full path to the test set(s), including the Root folder. It should look something like:
    Root\testfolder1\testset_a
  12. Click apply
  13. In the Post-build Actions section, click “Add post-build action”
  14. Choose “Publish Micro Focus tests result”
  15. For the “Report archive mode” there are several options. Choose the one appropriate for your use. I typically choose “Always archive HPE test reports”
  16. Click Save.

Viewing the results of LeanFT tests run via Jenkins

LeanFT jobs run from the file system

  1. In Jenkins, click on the job.
  2. Click the Console Output link.
  3. Find the Results section and navigate to the path shown.

4. Enter the RunResults folder and find the runresults.html file. Open the file in Internet Explorer to view the results.

LeanFT Jobs run from ALM

  1. From the dashboard, click on the job.
  2. Click the Console Output link to view the ALM information.
  3. 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=97

    • 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 97) to get to the report.
  4. On the Run Details screen, click the Report button then the “LeanFT Run Report” link. The report should open.

Summary

Using the above procedures, you will be able to set up Jenkins to run LeanFT 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 for security in your network or test environment.

*Older versions of LeanFT will be branded HPE rather than Micro Focus, so substitute one name for the other in older versions.

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.

Leave a comment