testing-strategy
它能做什么
这项技能规划团队应当如何测试软件,包括测试哪些内容,以及应当编写哪些类型的测试。适合希望测试可靠、又不浪费精力的开发人员和测试负责人。
适用场景
- ✓当你需要确定项目需要哪些测试,以及测试重点放在哪里时。
- ✓当团队询问如何测试新的 API、数据管道或前端时。
- ✓当你希望获得一份包含覆盖率目标和示例测试用例的测试计划的时候。
技能链接
https://github.com/TencentCloud/Octop/blob/main/src/octop/infra/agents/experts/library/engineering/skills/testing-strategy/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我们新的支付 API 制定测试策略,包括测试类型和覆盖率目标。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会运用测试金字塔的原则:大量快速的单元测试,适量的集成测试,以及少量的端到端测试。它会针对每类组件匹配相应的方法,并附上示例撰写测试计划。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Testing Strategy
Design effective testing strategies balancing coverage, speed, and maintenance.
Testing Pyramid
/ E2E \ Few, slow, high confidence
/ Integration \ Some, medium speed
/ Unit Tests \ Many, fast, focused
Strategy by Component Type
- API endpoints: Unit tests for business logic, integration tests for HTTP layer, contract tests for consumers
- Data pipelines: Input validation, transformation correctness, idempotency tests
- Frontend: Component tests, interaction tests, visual regression, accessibility
- Infrastructure: Smoke tests, chaos engineering, load tests
What to Cover
Focus on: business-critical paths, error handling, edge cases, security boundaries, data integrity.
Skip: trivial getters/setters, framework code, one-off scripts.
Output
Produce a test plan with: what to test, test type for each area, coverage targets, and example test cases. Identify gaps in existing coverage.
常见问题
什么是测试金字塔?
一种平衡测试的方法:底层是大量快速的单元测试,中层是较少的集成测试,顶层是数量很少、速度较慢的端到端测试。
哪些内容不需要测试?
简单的 getter 和 setter、框架代码以及一次性脚本。
它能发现现有测试中的缺口吗?
可以。它会找出现有覆盖范围中的缺口。
详情
作者的原始描述
Design test strategies and test plans. Trigger with "how should we test", "test strategy for", "write tests for", "test plan", "what tests do we need", or when the user needs help with testing approaches, coverage, or test architecture.
repo: TencentCloud/Octop
热度
- GitHub 星标
- 11k
- 排名
- #11651
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
polite-greeting
11k帮你的智能体用简短、友好且礼貌的问候开启对话,然后迅速进入你需要的事情。
medical-source-failover
11k帮你的智能体在主要来源被屏蔽、速度缓慢或难以阅读时,查找可信的中国医学指南、药品信息和公共卫生文件。
cowork-plugin-customizer
11k帮你的智能体通过替换占位符、调整技能和设置,使现有的 Claude 插件适配某个组织的工具和工作流程。
create-cowork-plugin
11k帮你的智能体通过引导式问答,从零开始构建一个新的 Claude 插件,涵盖技能、智能体、钩子以及可直接安装的插件包。