mitao-su/dsh-playwright-cli ↗★ 2
dsh-playwright-cli
封装 Playwright CLI 的 DSH 插件,支持在 Agent 循环中安装浏览器、跑测试并看报告
AI 分析
核心用途是让智能体能够直接执行自动化测试并输出 HTML 报告。适合需要进行端到端测试、前端自动化校验的开发与测试人员。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:mitao-su/dsh-playwright-cli說明文件
閱讀完整 README ↗使用示例
Agent 侧一次典型会话:
playwright_version(workdir 默认会话工作区)→ 确认 CLI 就绪;playwright_test(files: ["tests/login.spec.ts"],reporter: "html")→ 跑测试,得到reportDir;playwright_show_report→ 拿到url,用户直接在浏览器打开报告。
配置(profile cordis.patch.yml 按 id: playwright-cli 整段覆盖):
- insert:
- id: playwright-cli
name: dsh-playwright-cli
config:
timeoutMs: 600000 # 每次 CLI 调用的默认超时
reportDir: playwright-report
reportRoute: /playwright-report
autoInstallPackage: true # CLI 缺失时自动 npm install -D @playwright/test