Jenkins integration

ValueEdge incorporates data from your Jenkins CI pipelines into your application delivery process. This helps you analyze quality and progress.

Supported plugins

You connect your Jenkins server with the Application Automation Tools plugin to ValueEdge. You can then track and analyze builds, automated test results, and SCM data.

Tip: If you don't have a dedicated CI server, and you only need a lightweight CI to be used primarily for triggering UFT One test runs from ValueEdge, refer to Minimal Jenkins Installation for ValueEdge.

For the latest list of supported plugins, see Dependencies.

Follow these guideline when preparing the Jenkins integration:

  • If you are working with ValueEdge, make sure that you work with the plugin version 5.1 or later of this plugin, and that you do not have the ValueEdge CI plugin installed. For more details, see Install and configure the plugin on your CI server.
  • For ValueEdge-UFT One integration, make sure that you work with version 5.2 or later of this plugin and with UFT 12.50 or later.
  • For ValueEdge to collect LoadRunner Enterprise test results from pipeline runs, make sure that you work with version 5.2 or later of this plugin. For details, see LoadRunner Enterprise.
  • ValueEdge can display a pipeline's structure only if it is built using one of the following:

    • The built-in Jenkins upstream/downstream mechanism
    • The Multijob plugin
    • The Parameterized plugin

Back to top

Prerequisites

The following are the prerequisites for integrating ValueEdge with Jenkins:

Prerequisite Details
Java version 8 or later Verify your Java version.
ALM/Quality Center client The ALM/Quality Center client must be installed on the machine that runs the tests. To check if you have a client installed, follow the instructions on this page: http://<your_server>:8080/qcbin/TDConnectivity_index.html.
Node in Jenkins

For running file system scenarios with UFT One, you need to set up a node in Jenkins. For details, see Create an execution node.

JQuery Plugin and a plugin for publishing test results

For building and tracking pipelines in ValueEdge, install the following:

  • JQuery Plugin 1.7.2-1 or later (Required to enable the integration)
  • A plugin that enables publishing test results. For example, JUnit Plugin 1.10 or later, or NUnit plugin (Required to enable ValueEdge to collect your automated test results)
Jenkins Git plugin

For ValueEdge integration with UFT One, install Jenkins Git plugin (version 2.4.4 or later).

Back to top

Upgrade to the Application Automation Tool plugin

If you are currently using the ValueEdge CI plugin, you must remove it and replace it with the Application Automation Tools plugin.

  1. Go to the Jenkins Server home page.
  2. Click the Manage Plugins link in the left pane.
  3. Select the Installed tab and uninstall the ValueEdge CI plugin.
  4. Restart Jenkins.
  5. Install the Application Automation Tools plugin, version 5.1 or later.
  6. Restart Jenkins.
  7. Configure connection to the ValueEdge server.
  8. Move an existing CI server to a new address.

Back to top

Configure connection to the ValueEdge server

This section describes how to set up the connection between ValueEdge and the Jenkins machine.

Before you configure the connection:

  1. Ask the ValueEdge shared space admin for an API access client ID and client secret. The plugin uses these for authentication when communicating with ValueEdge. The access keys must be assigned with the CI/CD Integration role in all the relevant workspaces. For details, see API access.
  2. If your network requires a proxy to connect to the Internet, set up the proxy configuration:

    Action Details
    Define the HTTP Proxy Configuration

    Go to Manage Jenkins > Manage Plugins > Advanced and define the necessary HTTP Proxy Configuration details:

    • If the ValueEdge server is located outside of the Jenkins server's private network, define the proxy server's details to enable Jenkins to communicate with ValueEdge.
    • If the ValueEdge server and the Jenkins server are both in the same private network (common if you are using ValueEdge on premises), instruct Jenkins not to use the proxy to reach ValueEdge: Add ValueEdge's URL to the No Proxy Host list (using ValueEdge's Fully Qualified Domain Name (FQDN).
      Note: In this case, you may still need the proxy server details defined to enable Jenkins to access other external resources, such as Git.
    Test that Jenkins can now reach ValueEdge

    Click the Advanced button beneath the HTTP Proxy Configuration details. Enter ValueEdge's URL using its Fully Qualified Domain Name (FQDN), and click Test URL.

    Restart the Jenkins server Restarting is necessary for the plugin to use the new proxy settings.
  3. Decide which Jenkins user ValueEdge should use to execute jobs on the server.

    Caution: It is strongly recommended that you set this user’s permissions to the minimum required for this integration. The Jenkins user must have the following permissions:

    • Job Build: For working with ValueEdge pipelines
    • Job Create, Delete, and Read: For ValueEdge-UFT integration

    • Credentials create and Update: If your Git repository requires credentials

Configure the connection

To set up the connection between Jenkins and ValueEdge:

  1. Go to the Jenkins Server home page.
  2. Click the Manage Jenkins link in the left pane.
  3. Click Configure System.
  4. Scroll down to the ValueEdge CI section.
  5. Click Add ValueEdge server.
  6. Follow the instructions on the screen to complete the configuration:

    Field Details
    Location

    Enter the URL of the ValueEdge server using its fully qualified domain name (FQDN).

    Use the following format: http://<ValueEdge hostname / IP address> {:<port number>}/ui/?p=<shared space ID>

    For example, in this URL, the shared space ID is 1002: http://myServer.myCompany.com:8081/ui/?p=1002

    If the port is 80, you do not need to add the port number.

    You can copy the URL from the address bar of the browser in which you opened ValueEdge. For example, if this is your workspace URL, copy the full address: https://almoctane.saas.microfocus.com/ui/?p=100101/1002#/

    Client ID and Client secret

    Make sure to enter the exact text without leading or trailing spaces.

    Jenkins user
    • Enter the Jenkins user ValueEdge should use to execute jobs on the server. Make sure the user can log in to Jenkins and has the minimum permission required for this integration:
      Job Build permissions.
      Note: It is strongly recommended that you specify a Jenkins user for ValueEdge. If you do not specify a Jenkins user, ValueEdge uses the Anonymous user, and is limited to the Anonymous user permissions.

    • In some environments, you might want users in ValueEdge to only have access to a subset of jobs in specific workspaces. In this case, define a user in Jenkins that has access to a subset of jobs, click Advanced, and enter one or more sets of users per workspace in the field Jenkins user for specific workspaces.
      When creating a pipeline, you only see the jobs that can be accessed by the Jenkins user assigned to the current workspace. For details, see the plugin help of the field Jenkins user for specific workspaces.

  7. To connect additional ValueEdge shared spaces, click Add ValueEdge server and enter the details.
  8. Click Test Connection to validate the configuration.
  9. Click Submit to save your changes.

Post setup actions

After the connection is set up, you can do any of the following:

Back to top

Create and configure pipelines on Jenkins

Before you can create an ValueEdge pipeline, make sure you have configured the connection to your ValueEdge server (above).

To create an ValueEdge pipeline in Jenkins:

  1. Go to the Jenkins Server home page.
  2. Click on the job that you want to use as the root job for your pipeline.
    Note: Select a job that is not already part on an existing ValueEdge pipeline.
  3. In the menu in the left pane, click ValueEdge Pipelines.
  4. Click Create Pipeline.
  5. Select the configuration of the ValueEdge server configured in Jenkins.

  6. Enter the details for the pipeline:

    1. Provide a name for the pipeline.
    2. The Workspace list displays all of the workspaces on the ValueEdge server you configured in the ValueEdge CI section. Select a workspace for your pipeline.
    3. The Release list displays the releases available in the workspace you selected. Optionally, select a release to associate with your pipeline.
    4. The Milestone list displays the milestones available in the release you selected. Optionally, select a milestone to associate with your pipeline.
  7. Click Create.

Caution: If you delete a pipeline, all its labels and configuration information will be lost.

To edit the pipeline and configure pipeline steps:

  1. Go to the Jenkins Server home page.
  2. Click on a job that is included in an existing ValueEdge pipeline.
  3. In the menu in the left pane, click ValueEdge Pipelines. The page for editing pipelines opens.
  4. You can edit the pipeline’s name, workspace, release, or milestone. Note that if you change a milestone or release, a new set of runs is created on ValueEdge, with a new run history.
  5. For a job that runs tests, configure test and environment details. For details, see Create and configure pipelines.
    Note:

    • A Jenkins job may be included in a pipeline more than once. When you configure a Jenkins job, this affects all of the relevant steps in the ValueEdge pipeline.
    • To dynamically set environment tags during the build run, based on build parameter values, configure the pipeline in ValueEdge.
  6. Click Apply.

For details on tracking your pipelines in ValueEdge, see Run pipelines.

To configure a pipeline with parameterized tests (optional):

  1. If your tests are parameterized, each run result is displayed in ValueEdge as a separate test. To see run results under a single test with a separate run for each parameter value, add a parameter to your pipeline job called octane_test_result_name_run_regex_pattern.

  2. Define its value using a regular expression which splits the test name into two parts, one to be used as the test name, and the other (representing the parameter value) to be used as the external run ID.

    For example, if your test uses the format Test name [parameter1,parameter2], define the regex as \[,*\]

  3. In ValueEdge when you run the pipeline with parameters, define the parameter name as octane_test_result_name_run_regex_pattern. Define its value as the regex you defined in the job.

    In the above example, the result are two test runs whose name is the test name, and whose external run IDs are parameter1 and parameter2.

Back to top

Trigger suite runs from Jenkins

You can use automated test execution modes in the Jenkins plugin, to enable Jenkins to trigger suite runs. This can be useful in a number of scenarios. For example:

  • Defining a schedule in Jenkins (if you do not use Functional Test Execution).

  • Triggering suite runs from an auto action in a release process.

  • Triggering suite runs in ValueEdge as a step in a bigger pipeline.

The following modes are available:

Suite context

You provide suite IDs. The Jenkins job creates a suite run for each one, and triggers the test runs as if you ran the suite from ValueEdge.

The job does not have to be defined as a pipeline in ValueEdge. To see and analyze results, go to the suite run.

Pipeline context

You provide suite IDs. The Jenkins job fetches all tests from the selected suites. The job runs them by triggering the correct sub-job based on the assigned test runner.

The job should be defined as a pipeline in ValueEdge. To see and analyze results, go to the Pipeline module.

For details, see Application Automation Tools.

Back to top

Troubleshoot the Jenkins integration

If you are working with version 5.1 or later of this plugin, make sure you do not have the old ValueEdge Plugin installed on your Jenkins server.

The following table provides suggestions for solving integration issues:

Issue Possible solutions
Test Connection fails Verify that you are not using an outdated sdk version of the CI plugin.
Cannot run pipelines from ValueEdge. The Run button is disabled.
  • The Jenkins server might be down, or it is not communicating with ValueEdge.
  • If this occurred after upgrading from the ValueEdge Plugin: Make sure that in the plugin's ValueEdge CI configuration, you updated the Instance ID with the ID defined in ValueEdge for the CI server. For details, see Upgrade to the Application Automation Tool plugin.
When creating a new pipeline in ValueEdge, the message "Failed to fetch Jenkins job" is displayed in the Job field after you select a CI server.
  • This happens when a Jenkins job indirectly calls itself. Try creating the pipeline from Jenkins. In this case, the log files do not indicate any problem. Version 5.2 of this plugin introduced a fix for this issue.
  • See the next issue, "Errors occur when ValueEdge requests something from Jenkins".

Errors occur when ValueEdge requests something from Jenkins. When running a pipeline from ValueEdge, the error message is displayed: "Run pipeline: an Error occurred while running the pipeline”

When creating a new pipeline in ValueEdge, the message "Failed to fetch Jenkins jobs - Error 403 forbidden" is displayed in the Job field after you select a CI server.

This is an issue with the permissions of the Jenkins user that ValueEdge uses to execute jobs on the server.

In the Jenkins configuration, in the ValueEdge CI section, define a Jenkins user. This user must have Job Build permissions. For details, see Install and configure the plugin on your CI server.

When creating a new CI server in ValueEdge, the Jenkins server is not displayed in the list of connected servers even though Test Connection on Jenkins worked. Make sure that the Jenkins proxy settings are correct and that you restarted the Jenkins server after changing proxy settings. For details, see Install and configure the plugin on your CI server.
Test results from the pipelines are not reflected in ValueEdge. Test results from Maven jobs are not reported to ValueEdge if the job is under a folder. Free style and pipeline jobs report results as expected. Version 5.2 of this plugin introduced a fix for this issue.

Using log files to troubleshoot

Jenkins sends various events and data to ValueEdge. For example: Start job, Finish job, SCM data, test results.

When an error occurs, check the communication between Jenkins and ValueEdge.

To help troubleshoot, you might want to check the log file on the Jenkins server for things like connectivity issues or security issues.

The log files are located in the following locations:

  • Jenkins system logs: http://<Jenkins url>/log/all
  • Plugin logs: http://<Jenkins url>/userContent/nga/logs/nga.log

Understanding the plugin's log messages

  • At the end of a successful flow, Jenkins sends: done, left to send 0 events. For example:

    • INFO - EventsClient: sending events [job\-name:STARTED] to 'http://localhost:8080'...
    • INFO - EventsClient: sending events [job\-name:FINISHED] to 'https://mqast010pngx.saas.mf.com'...
    • INFO - EventsClient: ... done, left to send 0 events
    • INFO - TestDispatcher: There are pending test results, connecting to the MQM server
    • INFO - TestDispatcher: Successfully pushed test results of build job-name#10
  • When the ValueEdge server is not available, log messages may look like this:

    ERROR - BridgeClient: connection to MQM Server temporary failed: authentication error com.hp.mqm.client.exception.AuthenticationException: Authentication failed: code=503; reason=Service Unavailable

  • When an error occurs in the Jenkins -> ValueEdge communication, log messages may look like this:

    ERROR - EventsClient: max number of retries reached TestDispatcher: There are pending test results, but we are in quiet period

Back to top

Troubleshoot creating pipelines

Use this table to solve your integration issues.

Issue Possible solutions
Error when trying to create a pipeline: Unable to create pipeline

Make sure the workspace you selected is included in the list of workspaces defined for the access keys that you used to connect the ValueEdge CI to ValueEdge.

If you still encounter an error, select a different workspace, or ask an ValueEdge shared space admin to add the workspace to the list. For details, see API access.

Error when trying to configure a job: Unable to retrieve job configuration

The pipeline containing this job might have been created in ValueEdge in a workspace that is not accessible from the ValueEdge CI plugin. Make sure that the workspace is included in the list of workspaces defined for the access keys that you used to connect the ValueEdge CI to ValueEdge.

If you still encounter an error, ask an ValueEdge shared space admin to add the workspace to the list. For details, see API access.

Back to top

See also: