3.1 Jenkins mode - ogarling/LR2Graphite GitHub Wiki

The following five command line parameters are mandatory for Jenkins mode:

  • scenario path
  • dashboard name to put test results under in Targets-IO
  • unique testrun ID for Targets-IO
  • Jenkins build results URL so Targets-IO can provide a link to the specific testrun
  • standalone / parallel; when running in combination with a Gatling/JMeter also using Targets-IO test please input string "parallel"

As the example will show the third and fourth parameters are provided by Jenkins as published environment variables. So the testrun ID and build results URL parameters are static and can be cloned for different tests and products.

In a Jenkins job a Build step "Execute Windows batch command" must be added to launch LRlauncher.
Example:

@LR2Graphite\LRlauncher.exe scriptscenario.lrs DASHBOARDNAME %JOB_NAME%-%BUILD_NUMBER% %BUILD_URL% standalone

(please note that Targets-io dashboard names are UPPERCASE!)

Although not mandatory it is recommended to use the "Delete workspace before build starts" option in the "Build Environment" section of the Jenkins job. The Workspace Cleanup Plugin needs to be installed and activated in Jenkins.

Next: command line mode