Using Non-Supported Test Frameworks

circle-info

You are on Phase 2: Advanced Coverage Analytics >> Implementation Path: Using Non-Supported Test Frameworks.

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

1

Download the SeaLights Java Agent

Download the latest version of the SeaLights Java Agent.

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.ziparrow-up-right

Example CLI commands for downloading the SeaLights Java Agent:

# 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
circle-info

Instructions for downloading a specific version of the agent can be found herearrow-up-right

2

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:

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. 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 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

3

Run your tests

Execute your tests as you normally would.

4

Upload your test reports (Optional)

Upload your test report (Junit format) to SeaLights:

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"
5

Notify SeaLights that testing is complete

Notify SeaLights that you are done running your tests:

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

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

circle-check

Next Steps

With advanced coverage analytics in place, you're ready to move on to Phase 3: Continuous Coverage. In Phase 3, you'll integrate SeaLights into your CI pipeline for continuous, up-to-date visibility into build coverage.

Last updated

Was this helpful?