Jenkins and ALM integration for automated functional testing

Avik Paul
3 min readAug 15, 2019

Plugin Information:

PluginID: hp-application-automation-tools-plugin

This plugin allows Jenkins to trigger HP tests such as: Test sets on Application Lifecycle Management, tests saved on the file system from Unified Functional Testing, QuickTest Professional, or Service Test, and LoadRunner scenarios

Configuring the Connection to Your ALM Server

  1. Go to the Jenkins Server home page.
  2. Click the Manage Jenkins link in the left pane.
  3. In the Manage Jenkins Page click Configure System.
  4. In the Configuration tab, scroll down to the Application Lifecycle Management section.
  5. Click Add ALM server, if no server is currently configured.
  6. Specify a meaningful server name and URL. When specifying an ALM Server URL, use the full string: http:/myserver.mydomain:8080/qcbin

Running Tests Sets from ALM

Set up a job

  1. Go to the Jenkins Server home page.
  2. Click the New Job link or select an existing job.
  3. Enter a Job name (for a new job).
  4. Select Build a free-style software project and click OK.
  5. In the Project Configuration section scroll down to the Build section.
  6. Expand the Add build step drop-down and select Execute HP tests from HP ALM.
  7. Select one of the ALM servers that you configured in the previous step.
  8. Enter the server credentials, project and domain. Note: If you are using the ALM scheduler, it will run under the Jenkins agent user. For example, if Jenkins is running as a System user, the scheduler will run the tests as a System user. This will not affect test execution.
  9. Add the test set folders or specific test sets that you want to include, using the ALM path. To add multiple entries, click the down arrow on the right of the field and enter each item on a separate line. For example:

10.Root\testfolder1\testset_a

11.Root\testfolder1\testset_b

Root\testlab_folder

OR

Running Server Side Tests Using HP ALM Lab Management

If you have Lab Management activated in ALM, you can run server-side tests from functional test sets and build verification suites. After setting up the test sets and build verification suites, you can configure a Jenkins build step to execute your tests.

Set up a job

  1. Go to the Jenkins Server home page.
  2. Click the New Job link or select an existing job.
  3. Enter a Job name (for a new job).
  4. Select Build a free-style software project and click OK.
  5. In the Project Configuration section scroll down to the Build section.
  6. Expand the Add build step drop-down and select Execute HP tests using HP ALM Lab Management.
  7. Select one of the ALM servers that you configured in the previous step.
  8. Enter the server credentials, project and domain.
  9. Select a Run Type from the drop down menu (functional test set or build verification suite).
  10. Enter the ID of your run entity (either the test set ID or the build verification suite ID).
  11. Optional: Enter a description of the build step.
  12. Enter a duration (in minutes) for the timeslot. The minimum time is 30 minutes.
  13. Optional: If you have defined an AUT environment configuration in ALM, you can enter the ID here in order to execute your timeslot with specific AUT parameters.
    If you have CDA configured in ALM and want to implement it for this timeslot, select the Use CDA for provisioning and deployment checkbox and enter your CDA details.
    Set up the Post Build actions
  14. In the Post-build Actions section, expand the Add post-build action drop-down and select Publish HP test result.

Run the job

  1. Run or schedule the job as you would with any standard Jenkins job.

Review the results

  1. From the dashboard, click on the job.
  2. Click the Console link to view the ALM information.
  3. Copy the ALM link to your Internet Explorer browser and view the Test Set results from within ALM.

Source: https://wiki.jenkins-ci.org/display/JENKINS/HP+Application+Automation+Tools

--

--