CI Tools

The LoadRunner Cloud plugins for continuous integration provide a mechanism for executing load tests as part of a build script. These plugins allow 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

    Java Runtime Environment 8 is recommended.

  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. Enter credentials in the LoadRunner Cloud section:

      SettingDescription

      Username

       

      Your username to log into LoadRunner Cloud.

      Example: loadrunner.cloud@microfocus.com

      PasswordYour password to log into LoadRunner Cloud.
      URL

      The LoadRunner Cloud URL:

      https://loadrunner-cloud.saas.microfocus.com
    3. If you require Jenkins to connect to LoadRunner Cloud through a proxy server, you can configure proxy settings just for this connection without having to change your global proxy settings.

      Select the Use proxy connecting to LoadRunner Cloud server check box 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 and do not affect other areas of Jenkins.

  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 Home > CI/CD tools, 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/

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

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

Click Save & Test to test the connection using the configured parameters.

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.

  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 service endpoint 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.
    Username Your username to log in to LoadRunner Cloud. For example: loadrunner.cloud@microfocus.com.
    Password Your password to log in to LoadRunner Cloud.
    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. Ensure that you have selected the option Allow scripts to access the OAuth token in Azure DevOps 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.

Back to top

Use CLI

LoadRunner Cloud also provides CLI tools to enable you to run tests and get results when no CI plugin is available.

This section includes:

NodeJS CLI

This tool enables you to do the following:

Install the NodeJS environment

  1. Install NodeJS.
  2. Create a script directory and change the path to the new directory.

  3. Download and unpack the NodeJS CLI.
  4.  From the command line, type the following command:

    npm install storm_runner_cli.tgz

Run commands

Open a command line and type one of the following:

Command Project Code

Run a test (no results returned)

Yes
node cli run testId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id>:<project id> sendEmail=<True/False>
No
node cli run testId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id> sendEmail=<True/False>	

Run a test and return results

A .csv file is generated that contains the results of the test.

Yes
node cli runWithResult testId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id>:<project id> sendEmail=<True/False>
No
node cli runWithResult testId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id> sendEmail=<True/False>

Get the status of a test run.

The status is returned to the console.

Yes
node cli status runId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id>:<project id>
No
node cli status runId=<run number> connect=<user name>:<password>@<host> tenant=<tenant id>

Get the results of a test run

A .csv file is generated that contains the results of the test.

Yes
node cli getResult runId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id>:<project id>
No
node cli getResult runId=<run number> connect=<user name>:<password>@<host> tenant=<tenant id>

 
Argument Description Example 
testId

The test's testId.

Navigate to Load Tests > General > Summary to see the testId.

testId = 36
runId

The run id of the result.

Navigate to the Results page to see the run id.

runId = 48
connect Your credentials to log into LoadRunner Cloud. connect = myName:password
host The URL of your LoadRunner Cloud tenant. https://loadrunner-cloud.saas.microfocus.com
tenant

Your tenant id, specified in your LoadRunner Cloud URL.

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

354274891

project id

Your project id, specified in your LoadRunner Cloud URL.

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

1
sendEmail

Set to "true" to receive an email when the test completes.

For example: sendEmail=true

sendEmail=true

Java CLI

The Java CLI tool enables you to do the following:

Install the Java CLI Environment

  1. Install the Java Runtime Environment

    Java Runtime Environment 8 is recommended.

  2. Download and unpack the Java CLI.

  3. Create a test definition. For details, seeDefine a load test.

Run commands

Open a command line and type one of the following commands:

CommandProject Code

Run a test (no results returned):

Yes
java -jar cli.jar run testId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id>:<project id> sendEmail=<True/False>
No
java -jar cli.jar run testId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id> sendEmail=<True/False> 	

Run a test and return results

A .csv file is generated that contains the results of the test.

Yes
java -jar cli.jar runWithResult testId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id>:<project id> sendEmail=<True/False>
No
java -jar cli.jar runWithResult testId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id> sendEmail=<True/False>

Get the status of a test run.

The status is returned to the console.

Yes
java -jar cli.jar status runId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id>:<project id>
No
java -jar cli.jar status runId=<run number> connect=<user name>:<password>@<host> tenant=<tenant id>

Get the results of a test run

A .csv file is generated that contains the results of the test.

Yes
java -jar cli.jar getResult runId=<test number> connect=<user name>:<password>@<host> tenant=<tenant id>:<project id>
No
java -jar cli.jar getResult runId=<run number> connect=<user name>:<password>@<host> tenant=<tenant id>

 

ArgumentDescription Example 
testId

The test's testId.

Navigate to Load Tests > General > Summary to see the testId.

testId = 36
runId

The run id of the result.

Navigate to the Results page to see the run id.

runId = 48
connectYour credentials to log into LoadRunner Cloud.connect= myName:pass0rd
hostThe URL of your LoadRunner Cloud tenant.https://loadrunner-cloud.saas.microfocus.com
tenant

Your tenant id, specified in your LoadRunner Cloud URL.

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

354274891
project id

Your project id, specified in your LoadRunner Cloud URL.

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

1
sendEmail

Set to "true" to receive an email when the test completes.

Example: sendEmail=true

 

Security

When working with either the NodeJS CLI or the Java CLI, even though users can type the user name and password directly in the command line, we strongly recommend that you create a .ini file that contains the credentials and use this file as an argument in the command.

Important: Micro Focus encourages you to put your credentials in a .ini file instead of directly in a command line, as described below. By not using a .ini file, you may expose your system to increased security risks. You understand and agree to assume all associated risks and to not hold Micro Focus responsible in any way. It remains your sole responsibility at all times to assess your own regulatory and business requirements. Micro Focus does not represent or warrant that its products comply with any specific legal or regulatory standards applicable to you in conducting your business.

Create the file in the following format:

[connect]
username=<username>
password=<password>
url=https://loadrunner-cloud.saas.microfocus.com

You can then subsitute the argument config=<config file path> instead of connect=<user name>:<password>@<host>. For example:

node cli run testId=<test number> config=<config file path> tenant=<tenant id>:<project id> sendEmail=<True/False>

Caution: The user name and password are saved in the .ini file as plain text without any encryption. We strongly recommend that you protect this file by configuring access permissions and that you remove the file when it is no longer needed.

Back to top

See also: