# Using Non-Supported Test Frameworks

{% hint style="info" %}
You are on Phase 2: Advanced Coverage Analytics >> Implementation Path: Using Non-Supported Test Frameworks.&#x20;
{% endhint %}

#### Capturing Coverage Using Non-Supported Test Frameworks

If you're not using a supported test framework, you can still report test data to SeaLights by using the SeaLights Java Agent. The workflow for this scenario is:

1. Use the agent to tell SeaLights to start a test execution
2. Run your tests
3. (Optional) Use the agent to upload your JUnit reports to SeaLights
4. Use the agent to tell SeaLights to end the test execution

## Implementation Steps

{% stepper %}
{% step %}

#### Download the SeaLights Java Agent

Download the latest version of the SeaLights Java Agent.&#x20;

There are two agent files

* Build Scanner - sl-build-scanner.jar
* Test Listener - sl-test-listener.jar

These agent files can be downloaded from: <https://agents.sealights.co/sealights-java/sealights-java-latest.zip>

Example CLI commands for downloading the SeaLights Java Agent:

```bash
# Download the latest Java agent
wget -nv https://agents.sealights.co/sealights-java/sealights-java-latest.zip

# Extract the agent
unzip -oq sealights-java-latest.zip

#validate the agent version
echo "Sealights Java Agent version used is:" `cat sealights-java-version.txt`
```

{% hint style="info" %}
Instructions for downloading a specific version of the agent can be found [here](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/default-usage-cli/downloading-the-java-agent#downloading-the-specific-agent-version-defined-in-customer-settings)
{% endhint %}
{% endstep %}

{% step %}

#### **Notify SeaLights that tests are starting**

Before running your tests, notify SeaLights that you are about to start, while providing the name of your test type:

```bash
java -jar sl-test-listener.jar start \
  -tokenFile=/path/to/agent/tokenfile \
  -labid=<test-env-id> \
  -testStage "Functional Tests"
```

**Minimum Required Parameters**

* `sl.tokenFile` - Path to the [**agent token file**](/knowledgebase/phased-onboarding/java-onboarding-guide/getting-started/prerequisites.md#access-credentials). Note: The token can also be placed in a file named `sltoken` in the same directory as the agent. In that case, this parameter is not required.
* `sl.labid` - A unique name representing the environment in which your AUT[^1] was deployed (and against which you are testing). **This MUST match the Lab ID from Phase 1.**
* `sl.testStage` - A label for the type of tests being run (e.g., "Functional Tests", "Integration Tests", "E2E Tests"). This will be used when displaying the test results in your SeaLights reports.

Additional optional parameters may be found here: [Java Agent Configuration Parameters](/knowledgebase/phased-onboarding/java-agent-parameter-reference/java-agent-configuration-parameters.md)
{% endstep %}

{% step %}

#### Run your tests

Execute your tests as you normally would.

{% endstep %}

{% step %}

#### Upload your test reports (Optional)

Upload your test report (Junit format) to SeaLights:

```bash
java -jar sl-java-agent.jar uploadReports \
  -tokenFile=/path/to/agent/tokenfile \
  -labid=<test-env-id>  \
  -reportFile "/path/to/junit_report.xml" \
  -source "Junit xml report"
```

{% endstep %}

{% step %}

#### Notify SeaLights that testing is complete

Notify SeaLights that you are done running your tests:

```bash
java -jar sl-java-agent.jar end \
  -tokenFile <agent-token-file-path> \
  -labid <test-env-id>
```

{% endstep %}
{% endstepper %}

### Verification

To confirm Phase 2 was successful:

1. **Check the console output** — Look for messages confirming that the test stage was opened and closed successfully
2. **Visit the SeaLights Dashboard** — Verify that:
   * Your new test stage appears in the dashboard under your component
   * Coverage data begins appearing under the new test stage

{% hint style="success" %}
If this new test stage reflects coverage under your component, Phase 2 is complete!
{% endhint %}

***

### Next Steps

With advanced coverage analytics in place, you're ready to move on to [**Phase 3: Continuous Coverage**](/knowledgebase/phased-onboarding/java-onboarding-guide/phase-3-continuous-coverage.md). In Phase 3, you'll integrate SeaLights into your CI pipeline for continuous, up-to-date visibility into build coverage.

[^1]: Application Under Test


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sealights.io/knowledgebase/phased-onboarding/java-onboarding-guide/phase-2-advanced-coverage-analytics/using-non-supported-test-frameworks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
