CI/CD tools

The following CLI utilities enable you to run a StormRunner Load load test on your own CI/CD tool such as Jenkins.

Use the 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 StormRunner Load. connect = myName:passw0rd
host The URL of your StormRunner Load tenant. https://stormrunner-load.saas.hpe.com
tenant

Your tenant id, specified in your StormRunner Load URL.

For example: https://stormrunner-load.hpe.com./?TENANTID=354274891

354274891

project id

Your project id, specified in your StormRunner Load URL.

Example: https://stormrunner-load.saas.hpe.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

Back to top

Use the 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, see Define 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 StormRunner Load.connect= myName:pass0rd
hostThe URL of your StormRunner Load tenant.https://stormrunner-load.saas.hpe.com
tenant

Your tenant id, specified in your StormRunner Load URL.

Example: https://stormrunner-load.hpe.com./?TENANTID=354274891

354274891
project id

Your project id, specified in your StormRunner Load URL.

Example: https://stormrunner-load.saas.hpe.com/home/?TENANTID=354274891&projectId=1

1
sendEmail

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

Example: sendEmail=true

 

Back to top

Security

When working with either the NodeJS CLI or the Java CLI, if you do not want users to type the user name and password directly in the command line, you can create a .ini file that contains the credentials and use this file as an argument in the command. Create the file in the following format:

[connect]
username=<username>
password=<password>
url=https://stormrunner-load.saas.hpe.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.

Back to top

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:
    1. Download the StormRunner Load 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 StormRunner Load on Jenkins:
    1. From the Jenkins menu, select Manage Jenkins > Configure System.
    2. Enter credentials in the Storm Test Runner section:

      SettingDescription

      Username

       

      Your username to log into StormRunner Load.

      Example: storm.runner@hpe.com

      PasswordYour password to log into StormRunner Load.
      URL

      The StormRunner Load URL:

      https://stormrunner-load.saas.hpe.com
    3. If you require Jenkins to connect to StormRunner Load 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 StormRunner Load 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 StormRunner Load and do not affect other areas of Jenkins.

  4. Create and configure a new job to run a StormRunner Load test:
    1. From the Jenkins menu, select New item.
    2. Select Build a free-style software project.
    3. Click OK.
    4. Select Add build step > Storm run load -test.
    5. Enter the following:

      ArgumentDescription
      tenant

      Your tenant id, specified in your StormRunner Load URL.

      Example: https://yourCompany.saas.hpe.com/home/?TENANTID=354274891

      testId

      The test's testId.

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

      projectId

      Your projectId, specified in your StormRunner Load URL.

      Example: https://stormrunner-load.saas.hpe.com/home/?TENANTID=354274891&projectId=1

      SendEmailSelect the checkbox to be notified when the test ends.
  5. Configure the Jenkins Trending report for StormRunner Load (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:

    1. In Jenkins, select your SRL job and then select Configure from the menu.
    2. Select the Post-build Actions tab, and then click Add post-build action.
    3. From the drop down menu, select Generate StormRunner Trending and enter the following:

      Common
      Number of RunsThe number of last successful runs to include in the report. The valid range is 5-10.
      Benchmark

      Enter a specific run ID to use as a benchmark, or leave blank to compare a run to the previous run.

      Note: If you change the benchmark run ID, only those load tests that run after the change are compared to the new benchmark. Load tests that ran before the change show their original comparison.

      Thresholds: TRT (Avg)

      Enter a positive integer between 0-100

      ImprovementThe percentage decrease in average transaction response time considered to be an improvement in performance.
      Minor RegressionThe percentage increase in average transaction response time considered to be a minor regression in performance.
      Major RegressionThe percentage increase in average transaction response time considered to be a major regression in performance.

      Thresholds: TRT (Percentile)

      Enter a positive integer between 0-100

      ImprovementThe percentage decrease in the 90th percentile maximum transaction response time considered to be an improvement in performance.
      Minor RegressionThe percentage increase in the 90th percentile maximum transaction response time considered to be a minor regression in performance.
      Major RegressionThe percentage increase in the 90th percentile maximum transaction response time considered to be a major regression in performance.
  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 both a .csv and an .xml file in the workspace folder after the build completes.

  8. View the StormRunner Load Trend report:

    If you configured Jenkins to create a StormRunner Load Trend report, from the Jenkins dashboard click StormRunner 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.

 

Back to top