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.

Use the Jenkins plugin

  1. Install the Java Runtime Environment. We recommend JRE (Java Runtime Environment) version 8.

  2. Get the latest plugin and upload it to your Jenkins server:

    Caution: We recommend that you always use the latest version of the plugin. If you are upgrading from version 1.0.93 or earlier, previous configuration and historical data is not saved.

    1. Download the LoadRunner Cloud Jenkins Plugin.

    2. To upload the plugin to your Jenkins server, navigate to Jenkins in your browser, and select Manage Jenkins > Manage Plugins > Advanced from the Jenkins menu. From the Upload Plugin section, upload the “JenkinsStormPlugin.hpi” that you downloaded in the previous step.

    3. Restart your Jenkins server.

  3. Configure LoadRunner Cloud on Jenkins:
    1. From the Jenkins menu, select Manage Jenkins > Configure System.
    2. Locate the LoadRunner Cloud section and enter the LoadRunner Cloud URL: https://loadrunner-cloud.saas.microfocus.com.

    3. To authenticate with a username and password, enter the credentials.

      SettingDescription

      Username

       

      Your username to log into LoadRunner Cloud.

      Example:loadrunner.cloud@microfocus.com

      PasswordYour password to log into LoadRunner Cloud.
    4. To authenticate with an access key, select Use OAuth token. Paste in the Client ID, Client Secret, and Tenant ID values as provided by your administrator.

    5. If you require Jenkins to connect to LoadRunner Cloud through a proxy server, select Use proxy connecting to LoadRunner Cloud server and configure the following:

      SettingDescription
      Proxy HostThe proxy server host name.
      Proxy PortThe proxy server port number.
      Proxy UsernameThe username to log into the proxy server.
      Proxy PasswordThe password to log into the proxy server.

      These settings are only used for connections between Jenkins and LoadRunner Cloud—they do not affect other areas of Jenkins or your global proxy settings.

  4. Create and configure a new job to run a LoadRunner Cloud test. You can create two types of projects: Free-style or Pipeline.

  5. Configure the Jenkins Trending report for LoadRunner Cloud (optional):

    You can configure Jenkins to create a report that shows the trends for the last 5-10 runs of the load test configured in the job.

  6. Build the job:

    From the Jenkins dashboard, select the test and click Build Now.

  7. View the output:

    When the build completes, click Console Output on the dashboard to view the log.

    The JenkinsStormPlugin.hpi generates the following files in the workspace folder after the build completes:

    File Description
    srl_report_<tenant id>-<run id>.xml A Junit XML file containing basic information about the test, such as name, status, duration, and so forth.
    srl_report_<tenant id>-<run id>.csv A CSV file containing detailed test run results with metrics such as Vuser count, error count, and so forth.
    srl_report_trans-<tenant id>-<run id>.csv A CSV file containing detailed statistics on each transaction in the test run.
  8. View the LoadRunner Cloud Trend report:

    If you configured Jenkins to create a LoadRunner Cloud Trend report, from the Jenkins dashboard click LoadRunner Cloud Trend to view the report.

    The report is displayed, showing test run metrics for the configured number of last successful runs and the status (improvement, minor regression, major regression) according to the thresholds you set.

Note: If you abort a Jenkins job that includes a running load test, the plugin will attempt to stop the load test and download any results files (such as .xml or .csv files), if they are available. This attempt may fail in the event of network problems, or if Jenkins aborts the job before the plugin can stop the load test.

Back to top

Use the Bamboo plugin

Install and deploy the plugin

Action How to
Verify that your Bamboo server is up and running Bamboo Help
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:

    https://loadrunner-cloud.saas.microfocus.com

  • 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 will 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.

Navigate to Load Tests > Overview > General to see the test ID.

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 manage service connections help.

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

    Name Description
    Server URL URL to connect LoadRunner Cloud server. For example: https://loadrunner-cloud.saas.microfocus.com.
    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 field, and your Client Secret in the Password field.
    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 the 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.

    Navigate to Load Tests > Overview > General to see the test ID.

    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.
  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 (once 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 examlple, 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

See also: