Rust Testing
単体テスト、統合テスト、非同期テスト、プロパティベーステスト、モック、カバレッジを含むRustテストパターン。TDD方法論に従う。
Install
/plugin marketplace add affaan-m/ECCThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add affaan-m/ECC --skill rust-testinggit clone --depth 1 https://github.com/affaan-m/ECC.git /tmp/ECC
mkdir -p ~/.claude/skills
cp -r /tmp/ECC/docs/ja-JP/skills/rust-testing ~/.claude/skills/rust-testingPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Rust テストパターン
TDD方法論に従って信頼性が高く保守しやすいテストを書くための包括的なRustテストパターン。
## 使用場面
* 新しいRustの関数、メソッド、またはトレイトを書く場合
* 既存のコードにテストカバレッジを追加する場合
* パフォーマンスクリティカルなコードのベンチマークを作成する場合
* 入力検証にプロパティベーステストを実装する場合
* RustプロジェクトでTDDワークフローに従う場合
## 動作原理
1. **ターゲットコードを特定する** — テストする関数、トレイト、またはモジュールを見つける
2. **テストを書く** — `#[cfg(test)]` モジュール内で `#[test]` を使用、rstest でパラメータ化テスト、または proptest でプロパティベーステスト
3. **依存関係をモックする** — mockall を使用してテスト対象のユニットを分離する
4. **テストを実行する (RED)** — テストが期待通りに失敗することを確認する
5. **実装する (GREEN)** — テストを通過するための最小限のコードを書く
6. **リファクタリングする** — テストを通過したまま、コードを改善する
7. **カバレッジを確認する** — cargo-llvm-cov を使用し、80%以上を目標にする
## RustのTDDワークフロー
### RED-GREEN-REFACTOR サイクル
```
RED → まず失敗するテストを書く
GREEN → テストを通過する最小限のコードを書く
REFACTOR → テストを通過したままコードをリファクタリングする
REPEAT → 次の要件に進む
```
### Rustでの段階的TDD
```rust
// RED: Write test first, use todo!() as placeholder
pub fn add(a: i32, b: i32) -> i32 { todo!() }
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_add() { assert_eq!(add(2, 3), 5); }
}
// cargo test → panics at 'not yet implemented'
```
```rust
// GREEN: Replace todo!() with minimal implementation
pub fn add(a: i32, b: i32) -> i32 { a + b }
// cargo test → PASS, then REFACTOR while keeping tests green
```
## 単体テスト
### モジュールレベルのテスト整理Details
- Skill name
rust-testing- Repository
- affaan-m/ECC
- Path
docs/ja-JP/skills/rust-testing/SKILL.md- License
- MIT
- Repo updated
- 30 October 2026
- Listed in
- hesreallyhim/awesome-claude-code
FAQ
What does the Rust Testing skill do?
単体テスト、統合テスト、非同期テスト、プロパティベーステスト、モック、カバレッジを含むRustテストパターン。TDD方法論に従う。
How do I install the Rust Testing skill?
Claude Code plugin: /plugin marketplace add affaan-m/ECC. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Rust Testing popular?
It lives in affaan-m/ECC, which has 293,665 GitHub stars and 43,456 forks, and is included in 1 curated skill list.
Related skills
Accessibility
294kaffaan-m/ECC
WCAG 2.2 レベル AA 標準を用いてインクルーシブなデジタルプロダクトを設計・実装・監査します。Web 用のセマンティック ARIA および Web・ネイティブプラットフォーム(iOS/Android)のアクセシビリティトレイトを生成するために使用します。
Agent Architecture Audit
294kaffaan-m/ECC
エージェントおよび LLM アプリケーション向けのフルスタック診断。12 層のエージェントスタックにおけるラッパーリグレッション、メモリ汚染、ツール規律の失敗、隠れた修復ループ、レンダリング破損を監査します。重要度順の発見事項とコードファーストの修正を生成します。エージェントアプリケーション、自律ループ、または LLM を活用した機能を構築する開発者に必須です。
Agent Eval
294kaffaan-m/ECC
カスタムタスクでコーディングエージェント(Claude Code、Aider、Codex など)をヘッドツーヘッドで比較し、合格率、コスト、時間、一貫性のメトリクスを測定します
Springboot TDD
294kaffaan-m/ECC
Desarrollo guiado por pruebas para Spring Boot usando JUnit 5, Mockito, MockMvc, Testcontainers y JaCoCo. Usar al agregar funcionalidades, corregir bugs o refactorizar.
Rust Testing
294kaffaan-m/ECC
Patrones de pruebas en Rust incluyendo pruebas unitarias, de integración, async, basadas en propiedades, mocking y cobertura. Sigue la metodología TDD.
Springboot TDD
294kaffaan-m/ECC
Test-driven development for Spring Boot using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo. Use when adding features, fixing bugs, or refactoring.
Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.