Vitest Testing
提供 Vitest 单元测试与集成测试的模式与最佳实践,涵盖断言、异步测试与模拟方法。
自动设计功能、API及AI Agent测试用例,支持多平台适配。
openclaw skills install @cassianran/software-test-case-design命令、参数、文件名以原文为准
- 包含 "API Test" / "API Testing" → API 测试用例
- 包含 "Agent Test" / "Agent" / "AI Agent" → AI Agent 测试用例
- 默认 → 功能测试用例
templates/common-rules.md(规则文件)。根据测试用例类型选择对应的能力文件: - API 测试 → core-capabilities/api-testing.md
- AI Agent 测试 → core-capabilities/agent-testing.md + 从 core-capabilities/functional-testing.md 中选取第 1 部分:测试用例设计方法 和 第 2 部分:测试用例质量标准
- 功能测试 → core-capabilities/functional-testing.md
- 匹配平台关键词 → 加载 platform/{platform}.md
- API 测试 → checklists/api-checklist.md
- AI Agent 测试 → checklists/agent-checklist.md + 从 checklists/common-checklist.md 中选取第 I 部分:功能测试检查清单
- AI Agent 测试 + 平台 → checklists/agent-checklist.md + 从 checklists/common-checklist.md 中选取第 I 部分:功能测试检查清单 + checklists/{platform}-checklist.md
- 功能测试 + 平台 → checklists/common-checklist.md + checklists/{platform}-checklist.md
- 功能测试无平台 → checklists/common-checklist.md
examples/format-spec.md 中指定的 Markdown 表格格式输出✅ 可生成:功能测试、API 测试、AI Agent 测试、基础安全测试、平台特定测试
❌ 无法生成:测试计划、测试策略、渗透测试执行、漏洞扫描、性能/压力测试(并发/压力/负载)、自动化脚本
规则文件
templates/common-rules.md始终加载。能力文件根据测试用例类型选择。平台文件按需叠加。
| 关键词触发条件 | 加载文件 | 说明 |
|---|---|---|
| "API Test", "API Testing" | core-capabilities/api-testing.md | 独立使用,不叠加平台文件 |
| "Agent Test", "Agent", "AI Agent" | core-capabilities/agent-testing.md + 从 core-capabilities/functional-testing.md 中选取第 1 部分:测试用例设计方法 和 第 2 部分:测试用例质量标准 | 可叠加任意平台文件 |
| 默认情况 | core-capabilities/functional-testing.md | 功能测试 |
| 关键词触发条件 | 加载文件 | 说明 |
|---|---|---|
| "Mobile Testing", "App Testing" | platform/mobile-app.md | 支持手势操作、中断处理、网络环境、权限控制、推送通知、兼容性、性能测试 |
| "Mini-Program Testing" | platform/mini-program.md | 生命周期管理、授权机制、分享功能、支付流程、页面跳转、订阅服务 |
| "Mobile Web Testing", "H5 Testing" | platform/mobile-web.md | 响应式布局、触控交互、浏览器兼容性、视口设置、H5 特性、SEO 优化 |
| "Desktop Testing", "Desktop App Testing" | platform/desktop.md | 窗口管理、快捷方式、文件操作、系统集成、多显示器支持 |
| "PC Web Testing", "Web Testing" | platform/pc-web.md | 浏览器兼容性、页面布局、键盘操作、表单处理、会话管理、路由逻辑、拖拽功能 |
已收录 3 个 Skill