跳到正文
Skillpedia
测试11k · #11651

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/TencentCloud/Octop/blob/main/src/octop/infra/agents/experts/library/engineering/skills/testing-strategy/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能