name: rust-testing
description: "Rust testing expert for unit, integration, async, property-based, concurrency, and benchmark testing workflows."---
Rust Testing Skill
Use this skill for detailed, production-ready guidance in this Rust domain.
Core Question
How do we keep tests deterministic, fast, and meaningful?
Solution Patterns
Use unit tests for logic, integration for contracts
Use property tests for invariants
Use loom/criterion for concurrency/perf confidence
Workflow
Reproduce and isolate the issue with a minimal failing case.
Choose the smallest safe design that satisfies constraints.
Implement with explicit ownership, errors, and boundaries.
Verify with tests, linting, and scenario-specific checks.
Review Checklist
Correct behavior for both success and failure paths.
Ownership and API boundaries are explicit.
Error handling and diagnostics are actionable.
Performance-sensitive paths are measured.
Regression tests cover the changed behavior.
Common Pitfalls
Fixing flakes with sleep
Over-mocking
Slow tests in default CI path
Verification Commands
cargo test
cargo test -- --nocapture
cargo bench
cargo nextest run
Related Skills
rust-concurrency
rust-performance
rust-database
1---2name: rust-testing3description: ---4---5---6name: rust-testing7description: "Rust testing expert for unit, integration, async, property-based, concurrency, and benchmark testing workflows."---89# Rust Testing Skill1011Use this skill for detailed, production-ready guidance in this Rust domain.1213## Core Question1415**How do we keep tests deterministic, fast, and meaningful?**1617## Solution Patterns1819- Use unit tests for logic, integration for contracts20- Use property tests for invariants21- Use loom/criterion for concurrency/perf confidence2223## Workflow24251. Reproduce and isolate the issue with a minimal failing case.262. Choose the smallest safe design that satisfies constraints.273. Implement with explicit ownership, errors, and boundaries.284. Verify with tests, linting, and scenario-specific checks.2930## Review Checklist3132- [ ] Correct behavior for both success and failure paths.33- [ ] Ownership and API boundaries are explicit.34- [ ] Error handling and diagnostics are actionable.35- [ ] Performance-sensitive paths are measured.36- [ ] Regression tests cover the changed behavior.3738## Common Pitfalls3940- Fixing flakes with sleep41- Over-mocking42- Slow tests in default CI path4344## Verification Commands4546```bash47cargo test48cargo test -- --nocapture49cargo bench50cargo nextest run51```5253## Related Skills5455- `rust-concurrency`56- `rust-performance`57- `rust-database`
Run npx skillmds@latest add huiali/rust-testing in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
--- It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
huiali (@huiali) published this skill. Their other Agent Skills are listed on their SkillMD profile.