Rust Testing Patterns
Write comprehensive tests for Rust applications using unit, integration, and property-based testing.
Usage
Share code you want to test or ask about testing strategies for guidance on test design.
Examples
- "How do I test async functions in Rust?"
- "Set up property-based testing with proptest"
- "What's the best way to mock external dependencies?"
Guidelines
- Cover unit tests, integration tests, and doc tests
- Show how to test error conditions and edge cases
- Include async testing patterns with tokio::test
- Recommend mockall for trait-based mocking
- Explain test organization and naming conventions