[Feature]: Support sharing self-contained HTML reports with embedded screenshots and attachments
维护者通常 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 内容生成。
描述
🚀 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.
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 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/playwright 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/playwright#43759 · 1 条评论 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 68/100
microsoft/playwright#43741 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 1/100
microsoft/playwright#43813 · 2 个 reaction ·
维护者通常 1 天内回复
-
[Feature]: Opt-in way to keep the worker and its worker-scoped fixtures alive after a test failure未关闭
难度 4/5 3-5 天 新手友好度 35/100
microsoft/playwright#43811 ·
维护者通常 1 天内回复
-
[Bug]: ariaSnapshot({ mode: 'ai' }) drops the name of dialogs, landmarks, tables and column headers when it comes from a visible descendant可能已有人在做 @microsoft-playwright-automation 今天认领。 未关闭needs-triage
难度 3/5 1-2 天 新手友好度 25/100
microsoft/playwright#43809 · 3 条评论 ·
维护者通常 1 天内回复
查看 microsoft/playwright 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
excaliburjs/Excalibur#3895 ·
维护者通常 3 天内回复
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejected可能已有人在做 @Steve-20-ai 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Earn report crashes with "RangeError: Invalid time value" when a report row has an unparsable timestamp可能已有人在做 @Gurkaran18 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 75/100
joinmarket-webui/jam#1588 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
mihaip/infinite-mac#475 ·