rust-testing

Guide unit, integration, async, property-based, and mocking tests in Rust.

86|21|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/Jamkris/everything-gemini-code --skill rust-testing-jamkris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-testing
Source: https://github.com/Jamkris/everything-gemini-code/tree/main/skills/rust-testing
Command: npx skills add https://github.com/Jamkris/everything-gemini-code --skill rust-testing-jamkris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rust projects often struggle to establish reliable, maintainable tests across units, integrations, async flows, and property-based scenarios. This Skill provides a structured approach to writing tests that catch regressions early and support refactoring with confidence.

Core Features & Use Cases

  • Unit testing patterns using #[test] in Rust modules.
  • Integration and async testing strategies with cargo test and Tokio/async-std.
  • Property-based testing with proptest to explore input variants.
  • Mocking and isolation using mockall for deterministic tests.
  • TDD workflow guidance from red to green to refactor in Rust projects.
  • Real-world scenarios include validating library APIs, async I/O, and complex data transformations.

Quick Start

Create a new Rust project and run cargo test to see the TDD workflow in action.

Frequently Asked Questions about rust-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Rust tests for unit, integration, and async scenarios?

Property-based testing in Rust uses the proptest crate to explore input variants automatically. It validates complex data transformations and library APIs by generating diverse test cases, catching edge cases that traditional unit tests might miss.

How do I mock module boundaries in Rust for deterministic testing?

Mocking in Rust uses the mockall crate to isolate module boundaries for deterministic tests. This ensures reliable coverage by replacing dependencies with controlled mock objects during unit and integration testing workflows.

Can I follow a TDD workflow in Rust from red to green to refactor?

TDD in Rust projects follows a red-green-refactor workflow using cargo test. This enforces Rust testing conventions and documentation-driven examples, guiding development of new libraries and applications with reliable coverage.

What's the best way to test async I/O in Rust libraries?

Async I/O testing in Rust uses cargo test with Tokio or async-std runtimes. This validates library APIs and complex data transformations across integration boundaries, ensuring reliable coverage for asynchronous flows.