Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel23
printablefalse

Integrating the SeaLights Maven plugin into your pom.xml

...

Insert excerpt
Downloading the java agent files
Downloading the java agent files
nopaneltrue

Configuration file

JSON configuration parameters reference

Create a JSON configuration file with the following parameters in order to provide the necessary configuration fields to the SeaLights Maven plugin:

...

Note
  • If you override the surefire <argLine>...</argLine> then you need to add the SeaLights parameters inside the override value. See Surefire integration

  • Do not call the JSON file 'sealights.json' as the agent uses this file name for override options

  • For troubleshooting purpose,  you can use "buildName":"SL_Timestamp" in your JSON file to have the Sealights Maven plugin generating automatically a time stamp (yyyy.MM.dd-hh.mm format) as a default build name.

Info

See 'Java Command Reference - Installing test listener as Java Agent' for more parameter values and information

...

Code Block
languagexml
{
  "tokenFile": "sltoken.txt",
  "createBuildSessionId": true,
  "appName": "${JOB_NAME}",
  "branchName": "master",
  "buildName": "${BUILD_NUMBER}",
  "packagesIncluded": "*com.example.*",
  "packagesExcluded": "",
  "filesIncluded": "*.class",
  "filesExcluded": "*test-classes*",
  "recursive": true,
  "includeResources": true,
  "testStage": "Unit Tests",
  "labId": null,
  "executionType": "full",
  "logEnabled": false,
  "logDestination": "console",
  "logLevel": "off",
  "logFolder": "/tmp",
  "sealightsJvmParams": {},
  "enabled": true
}

Frequently used parameters

Configuring SCM 

SeaLights by default provides all links to the SCM for Github.

...

Info

For more details and recommendations on how to set those 3 parameters, please refer to our dedicated page https://sealights.atlassian.net/l/c/300TDd3Y .

Surefire and Failsafe argLine update

If you have configured the argLine for surefire and/or failsafe, the integration will include adding @{sealightsArgLine} to them.
This can be updated/overridden by adding and updating the following parameters to the JSON file:

...

Code Block
"surefireArgLine": "-Xms1280m -Xmx1280m @{sealightsArgLine}"
"failsafeArgLine": "-Xmx8192m @{sealightsArgLine} -Dsl.testStage=\"Integration Tests\""

Tagging

You can add tags to be viewed in the cockpit for the agents started by this maven job by passing them through the sl.tags property in the sealightsJvmParams field

Code Block
"sealightsJvmParams": {
    "sl.tags": "mytag",
}

Pre-downloading the agents

The Maven plugin downloads the recommended agent at the beginning of the run. If you want to pre-download them and provide them to the plugin, you can do so with the flags scannerJar & listenerJar.

...