Getting started
From pnpm add to a replayable failure in ~2 minutes.
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
Browser & runner support
- Mocha, Jasmine, Cucumber (via
beforeScenario/afterScenario) — supported. - Chrome / Chromium ≥ 116, Edge — rrweb + console + network (with a CDP-capable session).
- Firefox, Safari — rrweb + console. CDP is Chromium-only; tracelane degrades gracefully and still writes a report.
What about Playwright and Cypress?
The core (@tracelane/core) is framework-agnostic by design — it
wraps the per-framework browser handle behind a BrowserExecutor
interface. The Playwright fixture and Cypress plugin are on the near-term
roadmap; track progress on the repo.
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.
Questions or issues? Open one on GitHub.