testing-strategy

仓库创建 2026年7月27日最近提交 1 天前SkillHot 收录 1 天前
▸ 精选理由

帮助在开发前后设计合适测试并减少脆弱性与回归。

这个 Skill 做什么

制定与组织测试策略,包含TDD、用例层次与模拟建议。

帮你规划怎么写和组织测试:走 TDD(红绿重构)、AAA 模式、测试命名、金字塔层次,以及该 mock 什么不该 mock 什么。适合在实现新行为前、为已有代码补测试、修复 flaky 测试或判断单测/集成/端到端边界时使用。会给出具体放在哪一层、覆盖目标、命名和断言风格等可执行建议,让测试既有价值又不脆弱。

▸ 展开 SKILL.md 英文原文

Writes and structures tests: TDD red-green-refactor, AAA pattern, test naming, pyramid placement, what to mock. Use when adding tests, fixing flaky or failing tests, deciding unit vs integration vs e2e, measuring coverage, or before implementing any new behavior.

开发编程测试策略TDD覆盖与分层通用
0
Stars
0
Forks
21
仓库内 Skill
积累中
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/Ludenox-GIT/portable-agent-skills/main/skills/testing-strategy/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/Ludenox-GIT/portable-agent-skills/main/skills/testing-strategy/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Testing Strategy

## When to use

- Before implementing ANY new behavior (feature, bug fix, edge case handling).
- When adding tests to existing code, reviewing test quality, or restructuring a suite.
- When a test is flaky, slow, or broke after a refactor.
- When deciding where a test belongs: unit, integration, or e2e.
- When asked about coverage targets or mocking strategy.

When NOT to use: exploratory spikes you will throw away (delete the spike, then TDD the real thing), generated code you don't own, one-off migration scripts that run once under supervision.

## Iron Law

**NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.**

A test written after the code, that passes on its first run
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有