Quick Start

Get started with SeaLights SBT Plugin in 5 simple steps.

1

Prerequisites

  • SeaLights account and valid token (sltoken.txt)

  • Agent JARs: sl-build-scanner.jar and sl-test-listener.jar

  • SBT 1.x, Scala 2.12.x, Java 8+

  • Outbound network access to SeaLights server

2

Add Plugin to Your Project

Add to project/plugins.sbt:

addSbtPlugin("io.sealights" % "sealights-sbt-plugin" % "<latest-version>")
circle-info

Note: The plugin is an AutoPlugin, so it activates automatically on JVM projects.

3

Create Configuration

Create sl-config.json in your project root:

{
  "tokenFile": "./sltoken.txt",
  "scannerJar": "./sl-agents/sl-build-scanner.jar",
  "listenerJar": "./sl-agents/sl-test-listener.jar",
  "appName": "<scala-app>",
  "branchName": "<master>",
  "buildName": "<build-001>",
  "logFolder": "./sl-logs/build-001",
  "packagesIncluded": "<*com.example*>",
  "testTasksAndStages": {
    "Test/test": "Unit Tests"
  },
  "logLevel": "info",
  "logEnabled": true,
  "recursive": true,
  "logToConsole": true,
  "logToFile": true,
  "createBuildSessionId": true
}
circle-info

Tip: See Common Concepts for explanations of Build Scanner, Test Listener, Test Stages, and Build Session IDs.

4

Apply Configuration

Run the Build Scanner to wire SBT settings:

java -jar tools/sl-build-scanner.jar \
  -sbt \
  -configfile sl-config.json \
  -workspacepath /path/to/project

Parameters

Parameter
Description

-sbt

Generate SBT-specific settings

-configfile

Path to the JSON config

-workspacepath

Root directory of your SBT project

5

Run Tests with SeaLights

Execute:

sbt sealightsRun

This task performs:

  1. Build scan

  2. Test instrumentation

  3. Build end notification and reporting to SeaLights

Expected outcome: instrumented tests with results visible in the SeaLights dashboard.

Last updated

Was this helpful?