Sealights Ruby Agent - Running Tests

Integrating Sealights into testing files

The integration of the Sealights is done by adding a require statement of our agent to the testing files as follows:

require 'sealights-rspec-agent'

Configuration

The Sealights Ruby Agent read the following environment variables.

Environment variable

Description

Environment variable

Description

SL_TOKEN_FILE_PATH or SL_TOKEN

Set with a token or a file containing the token obtained from the SeaLights dashboard

SL_BUILD_SESSION_ID_PATH or SL_BUILD_SESSION_ID

Set with a build session id or a file containing the build session id created by the config step

SL_TEST_STAGE

Set the name of the test stage as will be displayed on the SeaLights dashboard

For example:

Usage

export SL_TOKEN_FILE_PATH=sltoken.txt export SL_BUILD_SESSION_ID_PATH=buildSessionId.txt export SL_TEST_STAGE="Functional Tests"

Test names

Due to limitations, the following characters will be substituted when passed to Sealights:

Allowed in RSpec test names

Substituted by

Allowed in RSpec test names

Substituted by

. (dot)

_ (underscore)

/ (slash)

# (hash)