rust-testing

📁 pproenca/dot-skills 📅 Jan 29, 2026
28
总安装量
28
周安装量
#7344
全站排名
安装命令
npx skills add https://github.com/pproenca/dot-skills --skill rust-testing

Agent 安装分布

claude-code 26
opencode 23
gemini-cli 22
github-copilot 21
codex 20
cursor 20

Skill 文档

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

Priority Category Impact Prefix
1 Test Organization CRITICAL org-
2 Mocking and Test Doubles CRITICAL mock-
3 Async Testing HIGH async-
4 Property-Based Testing HIGH prop-
5 Test Fixtures and Setup MEDIUM fix-
6 Assertions and Error Testing MEDIUM assert-
7 CI Integration MEDIUM ci-
8 Test Performance LOW-MEDIUM perf-

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

File Description
references/_sections.md Category definitions and ordering
assets/templates/_template.md Template for new rules
metadata.json Version and reference information