TestCafe reporter

This is the sealights reporter plugin for TestCafe.

Configuration

1

Install the Reporter

To install the Sealights TestCafe reporter, follow the instructions below.

npm install testcafe-reporter-sealights
2

Run TestCafe with SeaLights Reporter

Execute your TestCafe command and specify the reporter name by using the --reporter option and passing it arguments via the --sl- prefix

testcafe chrome test/spec.js --reporter sealights --sl-token sltoken.txt -[-sl-buildSessionIdFile buildSessionId] --sl-testStage 'API Tests' --sl-labId lab1

Logging and Debugging

Enable detailed logging:

export SL_LOG_LEVEL=debug

Sample End-to-End Pipeline Script

# 1. Install dependencies and SeaLights TestCafe reporter
npm ci
npm install testcafe-reporter-sealights

# 2. Run tests with SeaLights
#export SL_LOG_LEVEL=debug
testcafe chrome test/spec.js --reporter sealights --sl-token $SL_TOKEN --sl-testStage 'API Tests' --sl-labId QA-env2

✅ Coverage data are test results are uploaded automatically to your SeaLights dashboard

Reporter's Arguments

CLI Parameter
Description
Required

--sl-testStage

Name of the test stage (“Unit”, “Integration”, etc.)

--sl-token or --sl-tokenFile

Authentication token or Path to file containing the token (by default sltoken.txt)

--sl-buildSessionId or --sl-buildSessionIdFile

Build Session ID or Path to file containing the Build Session ID (by default buildSessionId)

--sl-labId

Lab ID used to group results

Optional

--sl-proxy

Proxy configuration (host:port or URL)

Optional

--sl-enforceFullRun

Overrides Test Optimization's recommendations and runs all tests.

Optional

Last updated

Was this helpful?