rust-testing
Installation
SKILL.md
Rust Testing and Benchmarking
Based on Chapter 11 of The Rust Programming Language and the Rust Book.
Capability Boundaries
✅ Strengths
- Unit tests (using
#[test], organizing test modules with#[cfg(test)]) - Assertion macros (
assert!,assert_eq!,assert_ne!,debug_assert!) - Test attributes (
#[should_panic],#[ignore],#[cfg(test)]) - Integration tests (tests/ directory and shared modules)
- Documentation tests (code blocks, hidden lines with
#, should_panic/no_run/ignore flags) - cargo test runner (filtering, --nocapture, --test-threads, --include-ignored options)
- Stable Criterion benchmarks; explicitly distinguishing stable Criterion from nightly-only libtest
#[bench]attribute - Code coverage using cargo-llvm-cov
- Asynchronous race conditions, backpressure, timeouts, process/daemon models, platform matrices, and resource-constrained testing
⚠️ Prerequisites
- Understanding of Rust module system (rust-workspace)