Skip to content

test: enable Playwright trace on all E2E test runs#987

Merged
wenytang-ms merged 3 commits intomainfrom
wenyt/enable-trace-on-all-runs
Apr 1, 2026
Merged

test: enable Playwright trace on all E2E test runs#987
wenytang-ms merged 3 commits intomainfrom
wenyt/enable-trace-on-all-runs

Conversation

@wenytang-ms
Copy link
Copy Markdown
Contributor

Change trace from \on-first-retry\ to \on\ so every test run captures screenshots and DOM snapshots at each Playwright action.

This makes debugging easier — especially when traces are reviewed by AI — since the full interaction flow is always available, not just on retries.

Changes

  • \playwright.config.ts: \ race: 'on-first-retry'\ → \ race: 'on'\
  • \�aseTest.ts: Always start tracing and always save trace.zip (not just on failure/retry)

Change trace from 'on-first-retry' to 'on' so every test run captures
screenshots and DOM snapshots at each Playwright action. This makes
debugging easier — especially when traces are reviewed by AI — since
the full interaction flow is always available, not just on retries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables Playwright tracing for all E2E test executions to make debugging easier by consistently capturing screenshots/DOM snapshots across the full interaction flow.

Changes:

  • Switch Playwright use.trace from "on-first-retry" to "on" in the E2E config.
  • Update the Electron-based baseTest fixture to always start tracing and always persist trace.zip.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
test/e2e/playwright.config.ts Enables trace capture for every test run via use.trace: "on".
test/e2e/fixtures/baseTest.ts Forces tracing start/stop in the shared E2E fixture and always writes trace.zip.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

wenytang-ms and others added 2 commits April 1, 2026 14:55
Address review comments:
- Use 'retain-on-failure' in CI to limit artifact size, 'on' locally
- Remove manual tracing.start/stop from fixture — Playwright's built-in
  use.trace config handles it automatically, avoiding 'Tracing has been
  already started' conflicts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wenytang-ms wenytang-ms merged commit cdd189c into main Apr 1, 2026
6 checks passed
@wenytang-ms wenytang-ms deleted the wenyt/enable-trace-on-all-runs branch April 1, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants