[Feature]: expose per-project workers on FullProject for reporters
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- playwright, typescript
- 领域
- testing-qa
调研方向
阅读公开类型 FullProject 及其从 FullProjectInternal 构建的方式;issue 指出,其中的 workers 已通过 resolveWorkers 解析。比较 FullConfig.workers 和 failOnFlakyTests 的公开方式,然后检查相关的 reporter 或项目类型测试。当 reporter 能通过公开的 project 对象读取每个项目已解析的 worker 限额时,即为完成,包括文档说明的 undefined 情况。
由索引模型根据 Issue 内容生成。
描述
🚀 Feature Request
Add workers to FullProject, resolved to a number the same way FullConfig.workers is. TestProject.workers lets a project cap its own concurrency, but a reporter only sees the global FullConfig.workers. Today the only way to read a project's limit is the internal config behind configInternalSymbol, which can change in any release. This is similar to failOnFlakyTests, which was added to FullConfig in 1.61 (#40918).
The resolved value already exists as FullProjectInternal.workers (via resolveWorkers, including the --debug override); this would expose it on the public project object.
Example
class MyReporter implements Reporter {
onBegin(config: FullConfig, suite: Suite) {
for (const project of config.projects) {
// undefined when the project doesn't set its own limit
console.log(project.name, project.workers ?? config.workers);
}
}
}
With this config:
export default defineConfig({
workers: 10,
projects: [
{ name: 'stateful', workers: 1 },
{ name: 'chromium' },
],
});
the reporter would print stateful 1 and chromium 10.
Motivation
Reporters that plan or split work across machines need each project's concurrency limit. A project limited to one worker should be handed tests in smaller batches than one that runs ten workers in parallel. Without a public field, these reporters read Playwright's internal config, and an internal refactor breaks them.
- 主要语言
- TypeScript
- 星标
- 100k
- 派生
- 6.9k
- 平均合并
- 16 小时 8 分钟
- 30 天内合并 PR
- 281
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/playwright 的其他 Issue
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)未关闭
难度 2/5 1-3 小时 新手友好度 62/100
microsoft/playwright#44289 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 12/100
microsoft/playwright#44290 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 22/100
microsoft/playwright#44288 ·
维护者通常 1 天内回复
-
[Bug]: page.goto never returns for a load started as a newer service worker takes over (Chromium)未关闭
难度 5/5 一周以上 新手友好度 12/100
microsoft/playwright#44287 ·
维护者通常 1 天内回复
-
[MCP] browser_tabs list/select indices diverge across HTTP sessions with --shared-browser-context未关闭
难度 4/5 3-5 天 新手友好度 22/100
microsoft/playwright#44279 ·
维护者通常 1 天内回复
查看 microsoft/playwright 的全部 Issue
相似的 Issue
-
good first issue
难度 2/5 半天 新手友好度 65/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
blamechris/chroxy#9272 ·
维护者通常 1 天内回复
-
no-repo-link tool-submission
难度 1/5 1 小时以内 新手友好度 66/100
BraveOPotato/NoSignups#2458 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
drmrd/vernacular#1061 ·
维护者通常 1 天内回复
-
[Bug] PUT /profiles/{id} silently drops design_prompt — designed voice profiles cannot be edited未关闭
难度 2/5 1-3 小时 新手友好度 82/100