Getting started
From install to a replayable failure in ~2 minutes.
Pick your runner: WebdriverIO · Playwright.
WebdriverIO
1. Install
In an existing WebdriverIO project:
pnpm add -D @tracelane/wdio @tracelane/core @tracelane/report
Or with npm / yarn:
npm i -D @tracelane/wdio @tracelane/core @tracelane/report.
webdriverio and @wdio/types are peer dependencies
(^9.0.0) — you already have them in a WDIO project.
2. Register the service
Add TracelaneService to the services array in wdio.conf.ts:
// wdio.conf.ts
import type { Options } from '@wdio/types';
import TracelaneService from '@tracelane/wdio';
export const config: Options.Testrunner = {
runner: 'local',
framework: 'mocha',
specs: ['./test/specs/**/*.ts'],
capabilities: [
{
browserName: 'chrome',
'goog:chromeOptions': {
args: ['--remote-debugging-port=9222', '--no-sandbox'],
},
},
],
services: [
['devtools', {}], // enables browser.cdp() for network capture
[
TracelaneService,
{
mode: 'failed', // 'failed' (default) or 'all'
outDir: './tracelane', // report output dir
capture: { rrweb: true, network: true, console: true },
},
],
],
reporters: ['spec'],
};
3. Run your tests
Run your suite normally:
pnpm wdio run wdio.conf.ts tracelane/<spec>--<title>--<cid>-<ts>.html.
Open it in any browser to scrub through the rrweb session, inspect console
logs, and see failed responses — entirely offline. One file, no server.
4. Options
Full options reference, the traceLaneHooks alternative (for setups that
can't register a Service), and the Mocha / Jasmine / Cucumber notes are in the
package README:
- @tracelane/wdio README on GitHub
- @tracelane/wdio on npm
- @tracelane/core on npm
- @tracelane/report on npm
security: false in the service
options, or suppress individual findings with a
tracelane.security.suppress.json file in your project root.
services: [[TracelaneService, { security: false }]], Browser & framework support
- Mocha, Jasmine, Cucumber (via
beforeScenario/afterScenario) — supported. - Chrome / Chromium ≥ 116, Edge — rrweb + console + network. Network is captured in-page on every browser; on Chromium a CDP-capable session additionally enriches it with authoritative status + no-response failures.
- Firefox, Safari, cloud Selenium — rrweb + console + in-page network (the
rrweb/network@1plugin needs no CDP). The CDP enrichment is the only Chromium-only extra; tracelane degrades gracefully and still writes a full report.
Verified install path
The maintainer's end-to-end walk of this getting-started flow lives in the repo at docs/qa/tracelane-qa.md — a copy-pasteable checklist plus a runnable WDIO fixture (docs/qa/fixtures/tracelane-demo) you can use to reproduce the same passing/failing scenarios.
Playwright
1. Install
In an existing Playwright project (@playwright/test ≥ 1.40):
npm i -D @tracelane/playwright npx @tracelane/cli init detects your
Playwright project, installs @tracelane/playwright, and registers
the reporter in playwright.config.* for you. You still do step 3
(swap the spec import to the fixture) by hand — the CLI prints the exact
line to change. The manual steps below are the same thing done yourself.
2. Register the reporter
Add the tracelane reporter to the reporter array in playwright.config.ts:
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['list'],
['@tracelane/playwright', { mode: 'failed', outDir: './tracelane-reports' }],
],
});
3. Use the fixture
Swap the import in your spec files:
import { test, expect } from '@tracelane/playwright/fixture';
The fixture is auto — every test in files that import this
test is recorded. No per-test wiring required.
4. Run and open the report
npx playwright test ./tracelane-reports/<spec>--<title>--<project>-<ts>.html.
Open it in any browser, fully offline — rrweb replay, console panel, and
failed-network panel, no server required.
Notes: network is captured in-page by the
rrweb/network@1 plugin on every browser
(Chromium / Firefox / WebKit) — no CDP required; on Chromium tracelane
additionally uses CDP to enrich the panel with authoritative status
and true no-response failures. Recording continues across
page.goto navigations; tracelane coexists with
Playwright's own trace option.
Further reading
- @tracelane/playwright on npm
- @tracelane/playwright README on GitHub
- tracelane vs Playwright Trace Viewer
Questions or issues? Open one on GitHub.