Individual skill
qa/unit-testing
单元测试方法论,覆盖 AAA 模式、Test Doubles、跨语言示例(JS/TS、Python、Go、Java)、前后端单元测试、边界与属性测试、变异测试
plugins/echoVic/boss-skill/skill/skills/qa/unit-testing/SKILL.md
Source commit d780783eba4ecc7c8b9429f95c9362df95f07c61
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 4, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
Standard SKILL.md format has not been attested at this commit. No installation command is available; inspect the source.
Repository context
- Repository stars (not skill ratings)
- 1,531
- Repository last updated
- Nov 6, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai-coding Repository topic
- awesome Repository topic
- awesome-list Repository topic
- codex Repository topic
- codex-plugins Repository topic
- openai Repository topic
- codex-skill Repository topic
- codex-skills Repository topic
- marketplace Repository topic
- codex-marketplace Repository topic
- testing Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
Read excerpt
# 单元测试方法论
## 单元测试的定义与原则
单元测试验证**最小可测试单元**(函数、方法、类、组件)的行为,隔离外部依赖。
### 核心原则
| 原则 | 说明 |
| -------- | ------------------------------------------------ |
| **隔离** | 一个测试只验证一个行为,不依赖其他测试或外部系统 |
| **快速** | 毫秒级执行,全部单元测试应在秒级完成 |
| **确定** | 相同输入多次运行结果一致,不依赖时间/网络/随机数 |
| **可读** | 测试代码即文档,命名清晰表达意图 |