Test Runners & Java Agent: Special Cases
This page documents how SeaLights supports special use cases when integrating SeaLights Java Agent with a Java-based test runner.
Use Case: Cucumber File Names as Tests
Background: By default, SeaLights treats each scenario in a Cucumber .feature file as a single test. For customers who treat each .feature file as a single test, this default behavior would limit the ability to utilize SeaLights test optimization feature (TIA). This feature was developed to support this use case.
Parameter: sl.cucumberFeatureLevel
Scope: Changes how the test runner reports cucumber tests to SeaLights
Since: 4.0.2614
Accepted Values: True/False
Behavior: If set to true, the test runner sends feature files as the test names (instead of scenarios names)
How to set sl.cucumberFeatureLevel
:
sl.cucumberFeatureLevel
:This parameter is set as a system property, not a cli parameter.
As an env var:
SL_CUCUMBER_FEATURE_LEVEL=true
In slconfig.json
(when using the SeaLights Maven or gradle plugin)
{
"tokenFile": "./sltoken.txt",
"createBuildSessionId": false,
"executionType": "testsonly",
"testStage": "Functional Tests",
...
"sealightsJvmParams": {
"sl.cucumberFeatureLevel": true
}
}
Use Case: Mark a “Calibration Run” from a Java Test Runner
Background: This setting allows you to mark a test execution as a TIA “calibration run” from the SeaLights agent on the test runner. If you aren’t sure how to use calibration mode, contact your SeaLights CSM for support.
Parameter: sl.calibrationLearning
Scope: Marking a test execution as calibrated run
Since: 4.0.2610
Accepted Values: True/False
Behavior: If set to true, the test runner marks the test run as a calibration execution (for TIA). When opening the execution, the agent sends an additional flag that informs the SeaLights backend about calibrated execution.
How to set sl.calibrationLearning
:
sl.calibrationLearning
:This parameter is set as a system property, not a cli parameter.
1.As an env var:
SL_CALIBRATION_LEARNING=true
2.In slconfig.json
(when using the SeaLights Maven or gradle plugin)
{
"tokenFile": "./sltoken.txt",
"createBuildSessionId": false,
"executionType": "testsonly",
"testStage": "Functional Tests",
...
"sealightsJvmParams": {
"sl.calibrationLearning": true
}
}
3.Starting a test execution using the sl-test-listener.jar directly Starting a test stage
java -Dsl.calibrationLearning=true -jar sl-test-listener.jar start ...
Last updated
Was this helpful?