Skip to content

Playwright: support embedding Java sources in captured traces #1452

Open

Description

@antonfilichkin

Problem

Allure configures Playwright tracing with screenshots and snapshots only, so Java sources can't be embedded in captured traces.

Playwright supports this via PLAYWRIGHT_JAVA_SRC and Tracing.StartOptions().setSources(true). But with Allure enabled, frame 0 of every trace stack is synthetic AspectJ weaving glue from AllurePlaywrightAspect, not the real caller. That makes the Trace Viewer's Source tab useless. Playwright only filters its own frames and builds the trace (a .zip) on its binary side, so it can't fix this itself.

Proposal

  • Add an opt-in allure.playwright.trace.sources property (default false) that embeds sources in the trace.
  • Rewrite the trace.stacks entry so each stack starts at the first file-backed frame. If no frame resolves, strip the leading AspectJ/Playwright weaving frames instead. On any error, attach the trace unchanged.

Implementation: #1450

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions