CI plugins

The LoadRunner Cloud plugins for continuous integration enable you to trigger a LoadRunner Cloud test as a build step and present the results in the CI server's user interface.

Note: This topic contains a number of instances where you need to enter the LRC server URL. You can get the URL by coping it from the address bar of the browser in which you opened LoadRunner Cloud. For example, if the URL in the address bar of the browser is https://loadrunner-cloud.saas.microfocus.com/home/?TENANTID=208294383&projectId=1, copy the address https://loadrunner-cloud.saas.microfocus.com.

Use the Jenkins plugin

We recommend that you always use the latest version of the plugin. Older versions of the plugin (versions 4.8.43 or earlier) have been deprecated.

To install the latest Jenkins plugin:

Download and install the latest LoadRunner Cloud Jenkins Plugin which is available on the official Jenkins plugins website.

To upgrade the Jenkins plugin from an older (deprecated) version:

Uninstall the old plugin, restart Jenkins, and then install the new Jenkins plugin.

Note: If you are upgrading from an older (deprecated version), previous configuration and historical data is not saved.

To use the deprecated Jenkins plugin:

To install and work with an old version of the Jenkins plugin (version 4.8.43 or earlier), do the following:

Back to top

Use the Bamboo plugin

To use the Bamboo plugin, carry out the following steps.

Install and deploy the plugin

Action How to
Verify that your Bamboo server is up and running Refer to the Bamboo documentation.
Download the plugin From LoadRunner Cloud banner > Tools and Integrations > Plugins, download the LoadRunner Cloud Bamboo plugin.
Install the plugin
  1. From Bamboo > Settings, select Manage apps.

  2. In Bamboo administration, click Upload app to upload the LoadRunner Cloud Bamboo plugin.

Configure LoadRunner Cloud server connection details

In Bamboo administration, configure the following details for connecting to LoadRunner Cloud:

  • Server URL. The URL of the LoadRunner Cloud server (see note in CI plugins for details).

  • For username/password authentication, enter the following:

    • User Name. Your user name to log on to LoadRunner Cloud.

    • Password. Your password to log on to LoadRunner Cloud.

  • For OAuth authentication, select Use OAuth token. Paste in the Client ID, Client Secret, and Tenant ID values as provided by your administrator.

Click Save & Test to test the connection using the credentials that you provided.

Add a task

Do the following to add a LoadRunner Cloud task to your job in Bamboo:

  1. From Bamboo > Default job > Task pane, click Add task.

  2. Select the LoadRunner Cloud task type.

Add the following task details:

Argument Description
Task description Give the task a description.
Disable the task If selected, the task does not run during the parent job.
Tenant

Your tenant ID, specified in your LoadRunner Cloud URL.

Example: https://loadrunner-cloud.saas.microfocus.com/home/?TENANTID=354274891

Project ID

Your ID specified in your LoadRunner Cloud URL.

Example: https://loadrunner-cloud.saas.microfocus.com/home/?TENANTID=354274891&projectId=1

Test ID

The ID for the test.

To see the test ID, open the test in the Load tests tab and click Test settings. The test ID is displayed in the upper-right side of the page.

Send Email Select this check box if you want to receive a notification email after the test run is finished.

Back to top

Use the Azure DevOps plugin

Use the Azure DevOps Server (also known as TFS, Team Foundation Server) and Visual Studio Team Services (VSTS, also known as Azure DevOps) plugin to include a LoadRunner Cloud test as part of a build script. tom

  1. Download the LoadRunner Cloud extension for Azure DevOps.

  2. Install the extension for Azure DevOps. For details, refer to the Azure DevOps extension installation help.

  3. Create a service endpoint. For details, refer to the Azure manage service connections help.

    When creating the service endpoint, configure the following parameters for LoadRunner Cloud:

    Name Description
    Server URL

    URL to connect to the LoadRunner Cloud server (see note in CI plugins for details).

    Authentication
    • For username/password authentication, enter the following:

      • User Name. Your user name to log on to LoadRunner Cloud.

      • Password. Your password to log on to LoadRunner Cloud.

    • For OAuth authentication, paste your Client ID in the User Name box, and your Client Secret in the Password box.
    Proxy URL Add your local proxy in the format http(s)://(host):(port#) or leave empty if you are not using a local proxy.
    Proxy Username If using a proxy that requires credentials, enter the user name.
    Proxy Password If using a proxy that requires credentials, enter the password.
  4. Add a task to the build. For details, refer to Azure tasks help.

    When creating the task, configure the following parameters for LoadRunner Cloud:

    Name Description
    LoadRunner Cloud Service Endpoint Select the service endpoint you created above for your LoadRunner Cloud server.
    Tenant ID

    Your tenant ID, specified in your LoadRunner Cloud URL.

    Example: https://loadrunner-cloud.saas.microfocus.com/home/?TENANTID=354274891

    Project ID

    Your project ID, specified in your LoadRunner Cloud URL.

    Example: https://loadrunner-cloud.saas.microfocus.com/home/?TENANTID=354274891&projectId=1

    Test ID

    The ID for the test.

    To see the test ID, open the test in the Load tests tab and click Test settings. The test ID is displayed in the upper-right side of the page.

    Send e-mail to the preset address Select this check box if you want to receive a notification email to a preset address after the test run is finished.
    Run Test in Detached Mode Select this check box if you don't want the task to wait for the load test run to finish. This disables the reporting of test run results.
  5. For earlier versions of the Azure DevOps server, you may need to enable the Allow scripts to access the OAuth token option before running the task.

  6. When the task has finished, you can view an artifact published on the Summary tab and a brief report on the LoadRunner Cloud tab.

  7. When finished, a variable called LRC_RUN_ID is available in the extension. This variable stores the ID of the run started by the task. You can use this variable in later steps in the same pipeline to query LoadRunner Cloud public APIs for additional metrics (after the run finishes and such metrics are available).

    To use the LRC_RUN_ID variable in the pipeline:

    Pipeline Job Steps
    Classic Same job
    1. Set a reference name for the LoadRunner Cloud test task.

    2. Refer to the variable in the format $(<ReferenceName>.<VariableName>).

    For example, if you set a reference name of LRC, refer to the variable by using $(LRC.LRC_RUN_ID).

    YAML Same job
    1. Set a name for the LoadRunner Cloud test task. For example, name:LRC.

    2. Refer to the variable in the format $(<ReferenceName>.<VariableName>).

    For example, if you set a name of LRC, refer to the variable using $(LRC.LRC_RUN_ID).

    YAML

    Different job

    Note: To use the variable in a different job, you must use the YAML pipeline.

    1. Set a name for the LoadRunner Cloud test task. For example, in the runLRC job, set name:LRC.

    2. In the jobs in different tasks, set dependsOn to the job name in which you defined the name for theLoadRunner Cloud test task in the above step. For example, dependsOn runLRC.

    3. Map the variable to the current job. For example, runIdFrom_LRC: $[ dependencies.runLRC.outputs['LRC.LRC_RUN_ID'] ].

    4. You can now refer to the variable using the mapping defined in the above step. For example, $(runIdFrom_LRC)

    For more information, see Use output variables from tasks in the Azure Devops documentation.

Back to top

Use GitHub Actions

LoadRunner Cloud provides a GitHub Action to enable you to trigger a load test and collect reports as part of a workflow. You can include the action as a step in your workflow YAML file and provide the necessary input parameters. For example:

Copy code
```
  - name: start a load test run
    uses: MicroFocus/lrc-gh-action@v1
    env:
      ...
    with:
      ...
```

For more information and examples, see LoadRunner Cloud GitHub Action.

For general information on GitHub Actions, refer to the GitHub Actions documentation.

Back to top

See also: