What problem does it solve?
Rust developers often struggle with writing consistent, maintainable tests that follow industry best practices, leading to flaky test suites, low code coverage, and missed bugs early in the development cycle.
Core Features & Use Cases
- TDD Workflow Guidance: Step-by-step RED-GREEN-REFACTOR cycle tailored specifically for Rust projects to enforce test-first development.
- Comprehensive Test Patterns: Covers unit tests, integration tests, async tests with Tokio, property-based testing with proptest, and mocking with mockall for dependency isolation.
- Coverage & CI Integration: Includes instructions for running test coverage with cargo-llvm-cov and setting up GitHub Actions pipelines to enforce quality gates like 80% coverage thresholds.
- Use Case Example: A Rust backend developer can use this skill to implement TDD for a new API endpoint, write parameterized tests for edge cases, and set up CI to fail builds if coverage drops below the required threshold.
Quick Start
Use the rust-testing skill to write a failing unit test for your new Rust function as the first step of a TDD workflow.