用途:为 VS Code 扩展编写、迭代和调试 Playwright 端到端(E2E)测试,并处理来自 GitHub Actions 的测试结果。
主要能力:提供编写测试、迭代测试、分析 CI 中 E2E 结果的参考文档(references/coding-playwright-tests.md、references/iterating-playwright-tests.md、references/analyze-e2e.md)。测试共享代码(helpers、locators、配置)位于 e2e-tests/shared/。支持 span 文件用于调试 trace,本地与 CI/GHA 均可用,输出到 ~/.sf/vscode-spans/,其中 web-.jsonl 对应 test:e2e:web,node-.jsonl 对应 test:e2e:desktop;该功能自动启用,无需手动开启。CI 运行时会复制到 test-results/spans/ 产物中。span 文件为 JSONL 格式,每行用 JSON.parse 解析,字段包括 name、traceId、spanId、parentSpanId、durationMs、status、startTime、attributes。
使用方式:运行测试命令如 npm run test:e2e:web、npm run test:e2e:desktop 等;运行 Playwright 测试时不要阻塞超过 30 秒,应使用 run_in_background: true 让测试在后台运行,之后再检查终端输出或输出文件。查看最新 span 可用 ls -lt ~/.sf/vscode-spans/,运行前清空以获得新输出可用 rm -rf ~/.sf/vscode-spans/。
适用场景:VS Code 扩展的 E2E 测试开发与 CI 结果分析。
限制:资料未提供更多平台、收费或效果信息;具体启用/OTLP 与文件方式参见 .claude/skills/span-file-export/SKILL.md。