with one click
testing-strategies
// Kailash Rust testing — 3-tier with NO MOCKING for Tier 2/3. Mocks against real infra BLOCKED.
// Kailash Rust testing — 3-tier with NO MOCKING for Tier 2/3. Mocks against real infra BLOCKED.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | testing-strategies |
| description | Kailash Rust testing — 3-tier with NO MOCKING for Tier 2/3. Mocks against real infra BLOCKED. |
Comprehensive testing approach for the Kailash Rust SDK using the 4-tier testing strategy with NO MOCKING policy.
Kailash testing philosophy:
Scope: Reproduce known bugs, permanent guards against re-introduction. Mocking: Depends on bug scope (Tier 1 rules for unit-level, Tier 2 for integration). Lifetime: PERMANENT -- regression tests are never deleted.
Every bug fix MUST start with a failing regression test. File: tests/regression_*.rs, function: issue_{number}_{short_description}.
Scope: Individual functions and structs. Mocking: Trait-based test doubles allowed. Speed: < 1s per test.
Scope: Component integration (workflows, database, APIs). Mocking: NO MOCKING. Speed: 1-10s per test.
Scope: Complete user workflows. Mocking: NO MOCKING. Speed: 10s+ per test.
Real issues found by real infrastructure: database constraint violations, API timeouts, race conditions, connection pool exhaustion, schema migration issues, LLM token limits.
Use instead: Test databases (Docker), test API endpoints, test LLM accounts (with caching), temp directories (tempfile crate).
crates/{crate}/
src/lib.rs # #[cfg(test)] mod tests at bottom (Tier 1)
tests/
regression_*.rs # Tier 0: permanent regression guards
integration/ # #[cfg(feature = "integration")] (Tier 2)
e2e/ # #[cfg(feature = "e2e")] (Tier 3)
tests/ # Workspace-level integration tests
docker-compose.test.yml
cargo test --workspace # Tier 0-1: Regression + Unit
cargo test --workspace --features integration # Tier 2: Integration
cargo test --workspace --features e2e # Tier 3: E2E
cargo tarpaulin --workspace --out Html # Coverage
#[cfg(feature = "integration")].env)testing-specialist -- Testing strategies and patternstdd-implementer -- Test-driven developmentdataflow-specialist -- DataFlow testing patterns