# 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 <a href="#use-case-cucumber-file-names-as-tests" id="use-case-cucumber-file-names-as-tests"></a>

**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`**:** <a href="#how-to-set-sl.cucumberfeaturelevel" id="how-to-set-sl.cucumberfeaturelevel"></a>

{% hint style="warning" %}
*This parameter is set as a system property, not a cli parameter.*
{% endhint %}

**As an env var:**

{% code overflow="wrap" lineNumbers="true" %}

```
SL_CUCUMBER_FEATURE_LEVEL=true
```

{% endcode %}

**In** `slconfig.json` **(when using the SeaLights Maven or gradle plugin)**

{% code overflow="wrap" lineNumbers="true" %}

```
{
  "tokenFile": "./sltoken.txt",
  "createBuildSessionId": false,
  "executionType": "testsonly",
  "testStage": "Functional Tests",
   ...
  "sealightsJvmParams": {
    "sl.cucumberFeatureLevel": true
  }
}
```

{% endcode %}

***

## Use Case: Mark a “Calibration Run” from a Java Test Runner <a href="#use-case-mark-a-calibration-run-from-a-java-test-runner" id="use-case-mark-a-calibration-run-from-a-java-test-runner"></a>

**Background:** This setting allows you to mark a test execution as a [**TIA**](https://docs.sealights.io/knowledgebase/test-optimization/test-optimization-overview) “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`**:** <a href="#how-to-set-sl.calibrationlearning" id="how-to-set-sl.calibrationlearning"></a>

{% hint style="warning" %}
*This parameter is set as a system property, not a cli parameter.*
{% endhint %}

**1.As an env var:**

{% code overflow="wrap" lineNumbers="true" %}

```
SL_CALIBRATION_LEARNING=true
```

{% endcode %}

**2.In** `slconfig.json` **(when using the SeaLights Maven or gradle plugin)**

{% code overflow="wrap" lineNumbers="true" %}

```sh
{
  "tokenFile": "./sltoken.txt",
  "createBuildSessionId": false,
  "executionType": "testsonly",
  "testStage": "Functional Tests",
   ...
  "sealightsJvmParams": {
    "sl.calibrationLearning": true
  }
}
```

{% endcode %}

**3.Starting a test execution using the sl-test-listener.jar directly** [#inlineextension-starting-a-test-stage](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/command-reference#inlineextension-starting-a-test-stage "mention")

{% code overflow="wrap" lineNumbers="true" %}

```
java -Dsl.calibrationLearning=true -jar sl-test-listener.jar start ...
```

{% endcode %}
