Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4d0feb9
feat(core): stamp a trace and span id on each test attempt in the art…
Winify Nov 9, 2026
f43d6de
fix: keep one manifest entry per retried test and number attempts fro…
Winify Nov 11, 2026
7104114
fix: keep one tracing group per attempt of a retried Selenium test
Winify Nov 11, 2026
a046d35
feat(core): version the artifacts manifest and give a test one trace
Winify Nov 13, 2026
b70735f
fix(python): regenerate the wire types for the command row's attempt …
Winify Nov 13, 2026
761c59c
fix(core): keep each attempt's per-test screenshot
Winify Nov 13, 2026
3b01607
fix(selenium): list a Cucumber scenario, not its steps, in the artifa…
Winify Nov 13, 2026
2e57161
feat: add a telemetry mode that writes only the artifacts manifest
Winify Nov 9, 2026
36b14ed
fix(selenium): stamp the .feature file on a Cucumber scenario queued …
Winify Nov 24, 2026
7fe9ccb
perf(selenium): skip the viewport read in telemetry mode
Winify Nov 24, 2026
8ca71f4
fix(service): end an attempt when its test ends, not after the hook s…
Winify Nov 24, 2026
bb3c7e2
Merge branch 'otel/1-manifest-trace-ids' into otel/2-telemetry-mode
Winify Nov 24, 2026
11067a1
test(selenium): cover the telemetry viewport skip at the session call…
Winify Nov 24, 2026
a2d62e7
Merge remote-tracking branch 'origin/main' into otel/1-manifest-trace…
Winify Nov 26, 2026
03204f5
Merge branch 'otel/1-manifest-trace-ids' into otel/2-telemetry-mode
Winify Nov 26, 2026
a1aa3c5
fix: redact secrets from manifest error messages
Winify Nov 26, 2026
d5c83fd
fix: merge a same-named selenium test only on a real retry signal
Winify Nov 26, 2026
f23e5cd
Merge branch 'otel/1-manifest-trace-ids' into otel/2-telemetry-mode
Winify Nov 26, 2026
c1434c4
test: pin that Jest re-runs stay separate attempt-0 entries
Winify Nov 26, 2026
387b865
Merge branch 'otel/1-manifest-trace-ids' into otel/2-telemetry-mode
Winify Nov 26, 2026
dedd3d7
Merge remote-tracking branch 'origin/main' into otel/2-telemetry-mode
Winify Nov 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/manifest-option-warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@wdio/devtools-service': patch
'@wdio/selenium-devtools': patch
'@wdio/nightwatch-devtools': patch
---

The ignored-options warning now names `emitArtifactsManifest` when the active mode ignores it.
5 changes: 5 additions & 0 deletions .changeset/nightwatch-telemetry-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wdio/nightwatch-devtools': minor
---

`mode: 'telemetry'` runs Nightwatch tests without any DevTools output: no backend, no UI window, no per-action capture, screencast or trace zips. The run writes only the artifacts manifest, which records the run id and each attempt's trace id.
5 changes: 5 additions & 0 deletions .changeset/selenium-telemetry-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wdio/selenium-devtools': minor
---

Add `mode: 'telemetry'` to the Selenium adapter. It starts no backend and opens no dashboard, captures no per-action DOM, screenshots or screencast, and writes no trace zip. The test lifecycle still runs and the artifacts manifest is written at session end, so results can reach an external sink without a replayable trace.
5 changes: 5 additions & 0 deletions .changeset/selenium-telemetry-viewport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wdio/selenium-devtools': patch
---

In telemetry mode the Selenium adapter no longer reads the page viewport at session start. The manifest never used it, and the read cost a driver round-trip per session.
5 changes: 5 additions & 0 deletions .changeset/service-telemetry-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wdio/devtools-service': minor
---

Add `mode: 'telemetry'`. It skips the DevTools backend and UI window, takes no per-action capture, screencast or zip, and still runs the test lifecycle. At session end it writes the `devtools-artifacts-<sessionId>.json` manifest, which lists each test's state and the trace id of every attempt, so a run can be linked to its traces without recording them. Live and trace modes are unchanged.
90 changes: 47 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,11 @@ The Python adapter takes `enable(secrets=["...", {"env": "LOGIN_PASSWORD"}])`, `

### 📦 Trace mode (trace.zip)

The dashboard runs in one of **two modes**, set per adapter via the shared `mode` option:
The dashboard runs in one of **three modes**, set per adapter via the shared `mode` option:

- **`live`** (default) — the interactive DevTools UI window described above.
- **`trace`** — a headless capture path that writes a portable trace archive, opened later in the **trace player**.
- **`telemetry`** — no backend, dashboard or per-action capture, and no trace zips: it writes only the `devtools-artifacts-<sessionId>.json` manifest, which carries each test's lifecycle, the run id and each attempt's trace and span ids. Zips stay opt-in through trace mode.

All three JavaScript adapters (`@wdio/devtools-service`, `@wdio/selenium-devtools`, `@wdio/nightwatch-devtools`) emit the **same normalized trace** through the shared `@wdio/devtools-core` capture library, so one archive format and one player serve every framework.

Expand All @@ -220,77 +221,80 @@ The Python adapter (`selenium-devtools-py`) writes the same archive through the
| Feature | WebdriverIO | Selenium | Nightwatch | Python |
|---|---|---|---|---|
| Trace mode + `show-trace` player | ✓ | ✓ | ✓ | ✓ |
| DOM time-travel (mutation capture) | ✓ | ◐ ¹ | ◐ ¹ | ✓ |
| Network requests (browser sessions) | ✓ | ◐ ² | ◐ ³ | ✓ |
| Telemetry mode (artifacts manifest only, for OpenTelemetry export) | ✓ | ✓ | ✓ | ✕ ¹ |
| DOM time-travel (mutation capture) | ✓ | ◐ ² | ◐ ² | ✓ |
| Network requests (browser sessions) | ✓ | ◐ ³ | ◐ ⁴ | ✓ |
| Stylesheets and fonts stored in the trace (`traceResources`, browser sessions) | ✓ | ✓ | ✓ | ✓ |
| Screencast (`filmstrip` / video) | ✓ ⁴ | ✓ ⁵ | ◐ ⁶ | ✓ ⁷ |
| Per-test granularity (`traceGranularity: 'test'`) | ✓ | ✓ | ◐ ⁸ | ✓ |
| Retry-aware retention (`tracePolicy`) | ✓ | ✓ | ◐ ⁹ | ◐ ¹⁰ |
| Per-test `screenshot` / `video`, attached to Allure | ✓ | ✓ | ◐ ¹¹ | ✕ ¹² |
| Cucumber Feature→Scenario→Step nesting | ◐ ¹³ | ✓ | ◐ ¹⁴ | ✕ ¹⁵ |
| Assertion capture (`captureAssertions`) | ✓ | ◐ ¹⁶ | ◐ ¹⁷ | ✓ |
| BiDi console / network capture | ✓ ¹⁸ | ✓ ¹⁸ | ◐ ¹⁹ | ✓ ¹⁸ |
| Screencast (`filmstrip` / video) | ✓ ⁵ | ✓ ⁶ | ◐ ⁷ | ✓ ⁸ |
| Per-test granularity (`traceGranularity: 'test'`) | ✓ | ✓ | ◐ ⁹ | ✓ |
| Retry-aware retention (`tracePolicy`) | ✓ | ✓ | ◐ ¹⁰ | ◐ ¹¹ |
| Per-test `screenshot` / `video`, attached to Allure | ✓ | ✓ | ◐ ¹² | ✕ ¹³ |
| Cucumber Feature→Scenario→Step nesting | ◐ ¹⁴ | ✓ | ◐ ¹⁵ | ✕ ¹⁶ |
| Assertion capture (`captureAssertions`) | ✓ | ◐ ¹⁷ | ◐ ¹⁸ | ✓ |
| BiDi console / network capture | ✓ ¹⁹ | ✓ ¹⁹ | ◐ ²⁰ | ✓ ¹⁹ |
| A11y tab + pick-locator overlay (trace player) | ✓ | ✓ | ✓ | ✓ |
| Transcript + Copy-for-LLM (trace player) | ✓ | ✓ | ✓ | ✓ |
| Typed passwords and credential headers masked and redacted (`maskInputs`, `maskSelectors`, `secrets`) | ✓ | ✓ | ✓ | ✓ |
| Unpacked trace output (`traceFormat: 'ndjson-directory'`) | ✓ | ✓ | ✓ | ✕ ²⁰ |
| Artifacts manifest for CI and reporters (`emitArtifactsManifest`) | ✓ | ✓ | ◐ ²¹ | ✕ ²² |
| Prints where each kept trace was written | ✓ ²³ | ◐ ²⁴ | ◐ ²⁴ | ◐ ²⁵ |
| Network without BiDi (Safari, Appium mobile browsers) | ◐ ²⁶ | ◐ ²⁶ | ◐ ²⁶ | ◐ ²⁶ |
| Unpacked trace output (`traceFormat: 'ndjson-directory'`) | ✓ | ✓ | ✓ | ✕ ²¹ |
| Artifacts manifest for CI and reporters (`emitArtifactsManifest`) | ✓ | ✓ | ◐ ²² | ✕ ²³ |
| Prints where each kept trace was written | ✓ ²⁴ | ◐ ²⁵ | ◐ ²⁵ | ◐ ²⁶ |
| Network without BiDi (Safari, Appium mobile browsers) | ◐ ²⁷ | ◐ ²⁷ | ◐ ²⁷ | ◐ ²⁷ |

✓ supported. ◐ partial. ✕ not supported. A number points to its note below the table. Each supported cell is backed by the cross-adapter conformance suite, a named test or a manual check, listed in [the feature list](https://github.com/webdriverio/devtools/blob/main/packages/conformance/src/features.ts).

¹ Without BiDi (Safari, Appium) the page collector is injected after each navigation, so a page the test leaves within tens of milliseconds is never captured.
¹ The Python adapter writes no artifacts manifest, so it has no telemetry mode.

² Without BiDi a page the test leaves within tens of milliseconds is never drained, so its requests are not listed.
² Without BiDi (Safari, Appium) the page collector is injected after each navigation, so a page the test leaves within tens of milliseconds is never captured.

³ Without BiDi (`bidi: true`) or Chrome's performance log (`goog:loggingPrefs`), a page the test leaves within tens of milliseconds is never drained, so its requests are not listed.
³ Without BiDi a page the test leaves within tens of milliseconds is never drained, so its requests are not listed.

⁴ Chrome streams over CDP; other browsers poll.
⁴ Without BiDi (`bidi: true`) or Chrome's performance log (`goog:loggingPrefs`), a page the test leaves within tens of milliseconds is never drained, so its requests are not listed.

⁵ Chromium streams over CDP; other browsers poll.
⁵ Chrome streams over CDP; other browsers poll.

⁶ Nightwatch exposes no stable CDP handle, so frames come from a `takeScreenshot` poll every 200 ms.
⁶ Chromium streams over CDP; other browsers poll.

⁷ Chromium streams over CDP; other browsers take a frame per page-changing command, plus wait polls and reads at most every 200 ms.
⁷ Nightwatch exposes no stable CDP handle, so frames come from a `takeScreenshot` poll every 200 ms.

⁸ Nightwatch fires the global `beforeEach` / `afterEach` once per test module for `describe/it` and exports-object tests, so they collapse to one slice keyed to the first test; Cucumber scenarios get real per-test slices.
⁸ Chromium streams over CDP; other browsers take a frame per page-changing command, plus wait polls and reads at most every 200 ms.

⁹ For `describe/it` and exports-object tests, `--retries` reruns a testcase internally without firing the per-test hooks again, so the other policies behave like `retain-on-failure`; Cucumber scenarios record every attempt.
⁹ Nightwatch fires the global `beforeEach` / `afterEach` once per test module for `describe/it` and exports-object tests, so they collapse to one slice keyed to the first test; Cucumber scenarios get real per-test slices.

¹⁰ Nothing the Python adapter sends carries an attempt number, so the retry-aware policies behave like `retain-on-failure`.
¹⁰ For `describe/it` and exports-object tests, `--retries` reruns a testcase internally without firing the per-test hooks again, so the other policies behave like `retain-on-failure`; Cucumber scenarios record every attempt.

¹¹ Nightwatch has no live Allure attach API, so per-test screenshots and videos are written to disk and listed in the manifest but not attached.
¹¹ Nothing the Python adapter sends carries an attempt number, so the retry-aware policies behave like `retain-on-failure`.

¹² The Python adapter has no `screenshot` / `video` options and no Allure attachment yet.
¹² Nightwatch has no live Allure attach API, so per-test screenshots and videos are written to disk and listed in the manifest but not attached.

¹³ The service records no feature ancestry for a scenario, so the trace nests Scenario→Step.
¹³ The Python adapter has no `screenshot` / `video` options and no Allure attachment yet.

¹⁴ Nightwatch steps are not stamped as nested groups, so the trace nests Feature→Scenario.
¹⁴ The service records no feature ancestry for a scenario, so the trace nests Scenario→Step.

¹⁵ The Python adapter stamps no Feature or Step groups, so a pytest-bdd scenario is one flat test group with no Feature parent and no Step children.
¹⁵ Nightwatch steps are not stamped as nested groups, so the trace nests Feature→Scenario.

¹⁶ `node:assert` rows pass and fail; jest-style `expect()` and chai produce no rows at all, and a failing matcher only marks its test failed.
¹⁶ The Python adapter stamps no Feature or Step groups, so a pytest-bdd scenario is one flat test group with no Feature parent and no Step children.

¹⁷ `assert.*`, `verify.*` and `node:assert` rows pass and fail; Nightwatch's `expect` API produces no rows.
¹⁷ `node:assert` rows pass and fail; jest-style `expect()` and chai produce no rows at all, and a failing matcher only marks its test failed.

¹⁸ Attached by itself when the session supports BiDi.
¹⁸ `assert.*`, `verify.*` and `node:assert` rows pass and fail; Nightwatch's `expect` API produces no rows.

¹⁹ Nightwatch turns it on with `bidi: true` plus `webSocketUrl: true` in the capabilities.
¹⁹ Attached by itself when the session supports BiDi.

²⁰ The Python adapter has no option for it and sends no format in its export request, so the backend writes a zip.
²⁰ Nightwatch turns it on with `bidi: true` plus `webSocketUrl: true` in the capabilities.

²¹ Nightwatch has no live Allure signal to turn the manifest on by itself, so it stays opt-in.
²¹ The Python adapter has no option for it and sends no format in its export request, so the backend writes a zip.

²² The Python adapter writes no artifacts manifest.
²² Nightwatch has no live Allure signal to turn the manifest on by itself, so it stays opt-in.

²³ Printed to stdout whatever the `logLevel`.
²³ The Python adapter writes no artifacts manifest.

²⁴ Logs the path at info level through the adapter's logger rather than printing it, so a run that hides info messages does not show it.
²⁴ Printed to stdout whatever the `logLevel`.

²⁵ Logs the path (the folder, for per-test traces) at info level through Python's `logging`, which hides info messages unless the run enables them (`--log-cli-level=INFO` under pytest).
²⁵ Logs the path at info level through the adapter's logger rather than printing it, so a run that hides info messages does not show it.

²⁶ Fetch and XHR calls carry headers and bodies; every other load comes from the page's Resource Timing buffer, with timing and size but no headers or body, and no status on Safari.
²⁶ Logs the path (the folder, for per-test traces) at info level through Python's `logging`, which hides info messages unless the run enables them (`--log-cli-level=INFO` under pytest).

²⁷ Fetch and XHR calls carry headers and bodies; every other load comes from the page's Resource Timing buffer, with timing and size but no headers or body, and no status on Safari.

<!-- capability-matrix:readme-trace:end -->

Expand All @@ -317,7 +321,7 @@ What counts as a user-facing action is filtered through the `ACTION_MAP` allow-l

**Assertion targets.** An assertion row names the element it is about, so selecting it boxes that element in the snapshot. A `node:assert` call (or a Python `assert`) takes values rather than elements, so its element comes from where the asserted value was read: `assert.equal(await heading.getText(), 'Secure Area')` names `heading`'s selector, and so does a value from any other element read, WebdriverIO's `getHTML` and `getComputedRole` included. Only a read made earlier in the same test (or Cucumber scenario) counts, and a value read from the page itself, such as the title or the URL, names no element, even when some element's text reads the same. WebdriverIO's `browser.getTitle()` is a `Page.getTitle` row of its own, and `expect(browser).toHaveTitle(...)` folds into that read as one `expect.toHaveTitle` row.

Trace mode and live mode are **mutually exclusive** — `screencast` options are ignored in trace mode (live-mode feature). Live and trace serve different audiences (humans debugging vs. agents diffing), and stacking them only costs perf.
Trace mode and live mode are **mutually exclusive** — in trace mode `screencast.enabled` is ignored (a warning is logged): `filmstrip` and `video` decide what is recorded, and the screencast tuning fields (`quality`, `maxWidth`, `pollIntervalMs`, …) still apply to whichever recorder runs. Live and trace serve different audiences (humans debugging vs. agents diffing), and stacking them only costs perf.

#### Viewing traces

Expand Down Expand Up @@ -375,7 +379,7 @@ The hash names a position in the trace, for a `?trace=` URL, a picked file and `

| Option | Values | Default | Description |
|--------|--------|---------|-------------|
| `mode` | `'live'` \| `'trace'` | `'live'` | `'live'` launches the DevTools UI; `'trace'` writes an offline artifact. |
| `mode` | `'live'` \| `'trace'` \| `'telemetry'` | `'live'` | `'live'` launches the DevTools UI; `'trace'` writes an offline artifact; `'telemetry'` writes only the artifacts manifest. |
| `traceFormat` | `'zip'` \| `'ndjson-directory'` | `'zip'` | Output layout. `'zip'` writes a single archive; `'ndjson-directory'` unpacks into `trace-<id>/`. |
| `traceGranularity` | `'session'` \| `'spec'` \| `'test'` | `'session'` | `'session'` writes one trace per worker; `'spec'` one per spec file; `'test'` one per test into its own `<spec>-<title>-<browser>[-retryN]/trace.zip` folder — the smallest, most navigable artifacts, and the best pairing for a retention policy. |
| `tracePolicy` | `'on'` \| `'retain-on-failure'` \| `'retain-on-first-failure'` \| `'on-first-retry'` \| `'on-all-retries'` \| `'retain-on-failure-and-retries'` | `'on'` | Which traces to keep. `'on'` keeps every trace; the rest keep only failing/retried tests — pairs well with `traceGranularity: 'test'`. |
Expand Down Expand Up @@ -623,7 +627,7 @@ Common options (all optional):

| Option | Values | Default | Notes |
|---|---|---|---|
| `mode` | `'live'` \| `'trace'` | `'live'` | Dashboard vs. portable artifact |
| `mode` | `'live'` \| `'trace'` \| `'telemetry'` | `'live'` | Dashboard vs. portable artifact vs. manifest only |
| `traceFormat` | `'zip'` \| `'ndjson-directory'` | `'zip'` | Trace mode only |
| `traceGranularity` | `'session'` \| `'spec'` \| `'test'` | `'session'` | One trace per session / spec / test |
| `tracePolicy` | `'on'` \| `'retain-on-failure'` \| … | `'on'` | Which traces to keep (trace mode) |
Expand Down
13 changes: 13 additions & 0 deletions packages/conformance/src/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ export const FEATURES = [
'selenium-devtools-py': covered(`${PYTHON}test_trace_export.py`)
}
},
{
id: 'telemetry-mode',
name: 'Telemetry mode (artifacts manifest only, for OpenTelemetry export)',
tables: ['readme-trace', 'cross-framework'],
cells: {
'devtools-service': covered(`${WDIO}trace-granularity.test.ts`),
'selenium-devtools': covered(`${SELENIUM}telemetry-mode.test.ts`),
'nightwatch-devtools': covered(`${NIGHTWATCH}telemetryMode.test.ts`),
'selenium-devtools-py': unsupported(
'The Python adapter writes no artifacts manifest, so it has no telemetry mode.'
)
}
},
{
id: 'dom-time-travel',
name: 'DOM time-travel (mutation capture)',
Expand Down
Loading