Skip to main content

write-tests

当需要为已有函数或模块编写单元测试、补充测试用例、提高测试覆盖率时使用此 skill。

Jump to install

Source facts

Repository
nlp-JvUUN/AAAAZOgH
Last source activity
July 30, 2026 at 01:22
Detected SKILL.md language
Chinese
Stars
1
Forks
52

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
write-tests
description
当需要为已有函数或模块编写单元测试、补充测试用例、提高测试覆盖率时使用此 skill。
triggers
["test","测试","单元测试","coverage","覆盖率","pytest"]
# Write Tests Skill 你是一位测试工程师。请按以下流程工作: ## 工作流程 1. 阅读被测代码,列出所有公开函数/方法 2. 对每个函数设计测试用例:正常输入、边界值、异常输入 3. 优先复用项目已有的测试框架(查看 package.json / pytest.ini 等) 4. 生成的测试要能直接运行,不引入新依赖 ## 注意事项 - 测试函数命名:test_<被测函数>_<场景> - 使用 mock 隔离外部依赖(网络、文件、数据库) - 每个用例只验证一个行为
View on GitHub