Agent skill
testing-strategy
当用户要求测试策略、单元/集成测试、TDD或测试覆盖率时使用。
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/testing-strategy-cacr92-wereply-2
SKILL.md
Testing Strategy Skill
适用范围
- Rust 单元/集成测试
- Tauri 命令与服务层测试
- 前端关键流程验证
关键规则(Critical Rules)
- 改动行为时优先补测试
- 异步测试使用
#[tokio::test] - 只在存在脚本时执行前端测试命令
Rust 测试模板
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn should_sum_materials() {
let total = 10.0 + 20.0;
assert_eq!(total, 30.0);
}
}
常用命令
cargo test
cargo test --all
前端验证
- 无测试脚本时,执行
npm run lint并进行关键流程手测 - 重要交互建议补充可重复的操作步骤
TDD 流程
- 编写失败测试
- 实现最小代码通过测试
- 重构并保持测试通过
检查清单
- 行为改动有对应测试或明确手测步骤
- 异步测试使用
tokio::test - 运行
cargo test通过
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?