askill
rust-testing

rust-testingSafety 100Repository

Rust testing patterns for CLI applications, libraries, and frameworks. This skill should be used when writing, reviewing, or refactoring Rust tests including unit tests, integration tests, mocking, async testing, and CI integration. Triggers on tasks involving Rust testing, cargo test, mockall, proptest, tokio test, or test organization.

32 stars
1.2k downloads
Updated 2/5/2026

Package Files

Loading files...
SKILL.md

Rust Testing Best Practices

Comprehensive testing guide for Rust applications, covering CLI testing, library testing, async patterns, and CI integration. Contains 42 rules across 8 categories, prioritized by impact to guide test design, mocking strategies, and CI optimization.

When to Apply

Reference these guidelines when:

  • Writing unit tests for Rust libraries or modules
  • Creating integration tests for CLI applications
  • Setting up mocking with mockall or trait-based design
  • Testing async code with Tokio
  • Configuring CI pipelines for Rust projects

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Test OrganizationCRITICALorg-
2Mocking and Test DoublesCRITICALmock-
3Async TestingHIGHasync-
4Property-Based TestingHIGHprop-
5Test Fixtures and SetupMEDIUMfix-
6Assertions and Error TestingMEDIUMassert-
7CI IntegrationMEDIUMci-
8Test PerformanceLOW-MEDIUMperf-

Quick Reference

1. Test Organization (CRITICAL)

2. Mocking and Test Doubles (CRITICAL)

3. Async Testing (HIGH)

4. Property-Based Testing (HIGH)

5. Test Fixtures and Setup (MEDIUM)

6. Assertions and Error Testing (MEDIUM)

7. CI Integration (MEDIUM)

8. Test Performance (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

95/100Analyzed 2/11/2026

An exceptionally well-structured and comprehensive guide for Rust testing practices. It covers a wide range of topics from unit testing to CI integration with clear categorization and triggers.

100
95
95
95
90

Metadata

Licenseunknown
Version-
Updated2/5/2026
Publisherpproenca

Tags

ci-cdtesting