test-running
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTest Running
运行测试
Run all appropriate tests according to repository guidelines.
按照仓库规范运行所有适用的测试。
When to Use This Skill
何时使用此技能
Use this skill:
- After linting passes
- Before staging changes for commit
- After implementing a feature or bug fix
- When verifying existing functionality still works
在以下场景使用此技能:
- 代码检查通过后
- 暂存提交的变更前
- 完成功能开发或bug修复后
- 验证现有功能是否仍正常工作时
Test Discovery
测试发现
Run tests according to repository guidelines. Look for test commands in:
- Repository documentation (,
README.md,AGENTS.md, etc.)CLAUDE.md - Package configuration (,
package.json,Makefile,pyproject.toml, etc.)Cargo.toml - Standard test patterns for the project type
If no test guidelines are found or they are unclear, ask the user for
clarification.
按照仓库规范运行测试。在以下位置查找测试命令:
- 仓库文档(、
README.md、AGENTS.md等)CLAUDE.md - 包配置文件(、
package.json、Makefile、pyproject.toml等)Cargo.toml - 项目类型对应的标准测试模式
如果未找到测试规范或规范不明确,请向用户确认。
Common Test Commands
常见测试命令
bash
undefinedbash
undefinedJavaScript/TypeScript
JavaScript/TypeScript
npm test
yarn test
pnpm test
npm test
yarn test
pnpm test
Python
Python
pytest
python -m pytest
make test
pytest
python -m pytest
make test
Other
Other
./bin/test-*
test
undefined./bin/test-*
test
undefinedTesting Process
测试流程
CRITICAL REQUIREMENT: 100% test success is MANDATORY.
For each test command found:
- Run it
- If ANY test failures occur, they MUST be fixed
- If issues can't be fixed immediately, stop and ask the user what to do next
- Only consider the task complete when ALL tests pass with 100% success rate OR the user explicitly gives permission to ignore certain failures
关键要求:必须100%测试通过。
对于找到的每个测试命令:
- 运行该命令
- 若出现任何测试失败,必须修复这些问题
- 若无法立即修复问题,请停止操作并询问用户下一步怎么做
- 只有当所有测试100%通过,或者用户明确允许忽略某些失败时,才视为任务完成
Important Notes
重要说明
- "Issues" includes not only test failures, but also noise in test output such as warnings which could mask true failures
- Don't proceed until all tests pass or user explicitly allows deferral
- Document any failures clearly with file, test name, and error message
- "问题"不仅包括测试失败,还包括测试输出中的干扰信息,例如可能掩盖真实失败的警告
- 在所有测试通过或用户明确允许延迟处理前,不要继续进行后续操作
- 清晰记录所有失败信息,包括文件、测试名称和错误消息
Output
输出结果
Report results organized by:
- Passing tests: Summary of what passed
- Failing tests: Each failure with file, test name, and error
- Recommendations: What needs to be fixed
If all tests pass, simply confirm: "All tests passed."
按以下分类整理并报告结果:
- 通过的测试:汇总通过的测试内容
- 失败的测试:每个失败项需包含文件、测试名称和错误信息
- 建议:需要修复的内容
如果所有测试通过,只需确认:"所有测试通过。"