What problem does it solve?
This Skill provides a comprehensive toolkit and strategies for ensuring the correctness, robustness, and performance of Rust code through advanced testing methodologies.
Core Features & Use Cases
- Property-Based Testing: Automatically discover edge cases and verify invariants using
proptest.
- Fuzz Testing: Uncover bugs and security vulnerabilities with
cargo-fuzz and structured fuzzing.
- Benchmark Testing: Measure performance characteristics and identify regressions with
Criterion.
- Contract Testing: Ensure trait implementations adhere to their defined contracts.
- Undefined Behavior Detection: Detect memory errors and UB with
Miri.
- Table-Driven Tests: Organize test cases for clarity and coverage.
- Use Case: When developing a critical parsing library, use property-based testing to ensure it handles all valid and invalid inputs gracefully, fuzz testing to find unexpected crashes, and benchmarking to guarantee optimal performance.
Quick Start
Run all tests for the rust-testing-verification skill using the command cargo test.