skill/skills/qa/test-execution/SKILL.md
测试执行方法,包含测试框架检测、测试运行、结果解析
npx skillsauth add echovic/boss-skill qa/test-executionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
你必须真正执行测试,禁止生成 Mock 数据!
jest.config.js, "jest" in package.jsonvitest.config.js, "vitest" in package.jsonplaywright.config.jscypress.jsonpytest.ini, "pytest" in dependencies*_test.go 文件| 语言 | 单元测试 | E2E测试 |
|------|----------|---------|
| Node.js | npm test | npx playwright test |
| Python | pytest | pytest tests/e2e |
| Go | go test ./... | - |
完整方法论:详见
Skill(skill: "qa/e2e-playwright")
检查以下标志确认项目使用 Playwright:
playwright.config.ts 或 playwright.config.js 存在package.json 中包含 @playwright/test 依赖e2e/ 或 tests/e2e/ 目录存在# 安装浏览器(首次或 CI 环境)
npx playwright install --with-deps
# 运行全部 E2E 测试
npx playwright test
# 仅 critical 标签(门禁加速)
npx playwright test --grep @critical
# 指定浏览器
npx playwright test --project=chromium
# JSON 报告(门禁解析用)
npx playwright test --reporter=json
Playwright JSON 报告关键字段:
| 字段 | 说明 |
|------|------|
| stats.expected | 通过的测试数 |
| stats.unexpected | 失败的测试数 |
| stats.flaky | 重试后通过的测试数 |
| stats.skipped | 跳过的测试数 |
# 查看 trace(失败时自动生成)
npx playwright show-trace <trace.zip路径>
# 打开 HTML 报告
npx playwright show-report
testing
交互规范,定义加载状态、空状态、反馈机制、动效、无障碍等交互细节
content-media
设计变体模式,产出2-3个设计方案及 tradeoff 分析,供用户选择后确定最终方案
content-media
设计系统规范,包含颜色、字体、间距、圆角、阴影、动效等基础设计token
testing
UI组件规范,定义按钮、输入框、卡片等基础组件的变体、尺寸、状态