Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Feature]: Support sharing self-contained HTML reports with embedded screenshots and attachments

未关闭
#43,771 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
playwright, typescript
领域
testing

调研方向

Start by reading the HTML reporter documentation and implementation to find how the report references screenshots, attachments, and traces. Then assess whether embedding those assets or exporting a portable package fits the reporter architecture. Done means recipients can open a shared report and view its results and supported attachments without needing the original project.

由索引模型根据 Issue 内容生成。

描述

needs-triage
🚀 Feature Request

Currently, when using the HTML reporter, the generated report depends on additional files and directories for screenshots, traces, and other test artifacts. If I download and share only the index.html file with someone, the report may open, but screenshots and other attachments fail to load because their referenced files are not available.

The current workaround is to share the entire playwright-report directory as a ZIP file. The recipient must download and extract it, then run the show-report command from a Playwright project.

Example of the issue:
The screenshot below shows how an image appears broken when the HTML report is shared without its associated assets.

Image
Example

Introduce a configurable option in playwright.config.ts that allows users to generate a self-contained HTML report or a portable report package.

For example, an illustrative configuration could look like this:

reporter: [
  [
    "html",
    {
      outputFolder: "playwright-report",
      selfContained: true,
    },
  ],
],

The selfContained option is only a proposed API name; the implementation could use whichever configuration best fits Playwright's existing architecture.

Ideally, this feature would support one or both of the following approaches:

Single-file HTML report: Embed screenshots, images, and other suitable attachments directly into the HTML report so that users can share one file without broken references.

Portable report export: Provide a built-in way to package the HTML report and all required assets into a single archive or portable artifact that recipients can open without installing Playwright or creating a Playwright project.

The solution should preserve the existing report functionality as much as possible, including test results, failure details, screenshots, and trace access where technically feasible.

Motivation

This feature would make Playwright's HTML reporting workflow more convenient for teams that regularly share test execution results with developers, QA engineers, clients, and other stakeholders.

Key benefits include:

  • Prevent broken screenshots when sharing a standalone HTML report.
  • Eliminate the need to manually ZIP the report directory.
  • Allow recipients to view test results without installing Playwright or accessing the original repository.
  • Simplify the distribution of reports generated by CI/CD pipelines and distributed test runners.
  • Make test execution evidence easier to share, review, and retain independently of the original project.

I understand that embedding large screenshots, videos, and trace files could significantly increase the HTML file size. A portable archive option could be a practical alternative if generating a fully self-contained HTML report is not feasible.

Thank you for considering this feature. It would make Playwright reports significantly easier to share and review outside the original automation environment.

主要语言
TypeScript
星标
98.5k
派生
6.7k
平均合并
17 小时 5 分钟
30 天内合并 PR
326

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/playwright 的其他 Issue

查看 microsoft/playwright 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。