Agent skill · software engineering · affaan-m
rust-testing
Rust testing patterns including unit tests, integration tests, async testing, property-based testing, mocking, and coverage. Follows TDD methodology.
Why this skill is useful
Provides specific Rust testing patterns and TDD methodologies that enhance the AI's ability to generate reliable tests in Rust projects.
What it needs
About 6k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.
What this skill does
Rust Test Desenleri TDD metodolojisini takip ederek güvenilir, bakım yapılabilir testler yazmak için kapsamlı Rust test desenleri. Ne Zaman Kullanılır Yeni Rust fonksiyonları, metotları veya trait'leri yazma Mevcut koda test kapsamı ekleme Performans-kritik kod için benchmark'lar oluşturma Girdi doğrulama için property-based testler uygulama Rust projelerinde TDD iş akışını takip etme Nasıl Çalışır 1. Hedef kodu tanımla — Test edilecek fonksiyon, trait veya modülü bul 2. Bir test yaz — #[cfg(test)] modülünde #[test] kullan, parametreli testler için rstest veya property-based testler için proptest 3. Bağımlılıkları mock'la — Test altındaki birimi izole etmek için mockall kullan 4. Testleri çalıştır (RED) — Testin beklenen hata ile başarısız olduğunu doğrula 5. Uygula (GREEN) — Geçmek için minimal kod yaz 6. Refactor — Testleri yeşil tutarken iyileştir 7. Kapsamı kontrol et — cargo-llvm-cov kullan, 80%+ hedefle Rust için TDD İş Akışı RED-GREEN-REFACTOR Döngüsü Rust'ta Adım-Adım TDD Unit Testler Modül Seviyesi Test Organizasyonu Assertion Makroları Hata ve Panic Testi Result Dönüşlerini Test Etme Panic'leri Test Etme Entegrasyon Testleri Dosya Yapısı Entegrasyon Testleri Yazma Async Testler Tokio ile Test Organizasyon Desenleri rstest ile Parametreli Testler Test Yardımcıları proptest ile Property-Based Testing Temel Property Testleri Özel Stratejiler mockall ile Mock'lama Trait-Tabanlı Mock'lama Doc Testleri Çalıştırılabilir Dokümantasyon /// use mycrate::add; /// /// asserteq!(add(2, 3), 5); /// asserteq!(add(-1, 1), 0); /// norun /// use mycrate::parseconfig; /// /// let config = parseconfig(r#"port = 8080"#).unwrap(); /// asserteq!(config.port, 8080); /// norun /// use mycrate::parseconfig; /// /// assert!(parseconfig("}{invalid").iserr()); /// Criterion ile Benchmark'lama Test Kapsamı Kapsamı Çalıştırma Kapsam Hedefleri Kod Tipi Hedef ---------- ------- Kritik iş mantığı 100% Public API 90%+ Genel kod 80%+ Oluşturulmuş / FFI binding'leri Hariç tut Test Komutları E …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills affaan-m/rust-testing--d361c3