Node.js Agent
Set up the SeaLights Node.js Agent for frontend and backend JavaScript applications.
Use the Node.js Agent to collect coverage and test data from JavaScript and TypeScript applications.
It supports:
Frontend apps such as Angular, React, and Vue
Backend Node.js services
In-process test coverage uploads
Out-of-process functional test coverage
This page helps you choose the right setup. Use the stepper to pick the application path and test flow that match your use case.
Choose your application path
Choose the application path that matches your build and deployment model.
Use this path for bundled browser apps.
Scan the built output
Instrument the files with
instrumentbefore deploymentRun out-of-process functional tests against the instrumented app
Next pages:
Use this path for Node.js APIs, workers, and server processes.
Scan the service code
Start the app with
runRun out-of-process functional tests against the live service
Next pages:
Choose your test flow
Choose the test flow that matches how your tests run and where coverage comes from.
Use this flow when the test runner executes the application code in the same process.
Typical examples:
Unit tests
In-process integration tests
Mocha, Karma, or AVA runs that produce NYC coverage
How it works:
Open a test stage
Run the tests
Upload JUnit results
Upload the NYC coverage file with
nycReport
This flow uses the test runner output as the coverage source. It does not rely on a separately running application.
Framework pages:
Use this flow when tests run against a separate application process.
Typical examples:
Functional tests
End-to-end tests
Browser or API tests that target a running app
How it works:
Scan the app
Instrument the frontend build or start the backend with
runOpen a test stage for the external test runner
Run the tests against the live app
Upload JUnit results while the app reports footprints
This flow uses the running application as the coverage source. It usually relies on a Lab ID to connect the test runner with the instrumented app.
Choose this flow for functional, API, browser, and end-to-end tests that target a live application.
Mocha can also be used here when it drives a separate running application. Other common frameworks include Playwright and similar functional test runners.
Next pages:
Common next pages
Last updated
Was this helpful?

