duende_test/
lib.rs

1//! # duende-test
2//!
3//! Testing infrastructure for the Duende daemon framework.
4//!
5//! This crate provides:
6//! - **Test harness**: Daemon lifecycle testing utilities
7//! - **Chaos injection**: Latency, errors, packet loss simulation
8//! - **Load testing**: Performance testing under load
9//! - **Falsification tests**: 110 Popperian tests for spec compliance
10//!
11//! ## Iron Lotus Framework
12//!
13//! - **Built-in Quality** (品質の作り込み): Quality cannot be inspected in
14//! - **Popperian Falsification**: Tests designed to refute claims
15//! - **Extreme TDD**: Write failing tests first
16//!
17//! ## Example
18//!
19//! ```rust,ignore
20//! use duende_test::{DaemonTestHarness, ChaosConfig};
21//!
22//! let harness = DaemonTestHarness::new()
23//!     .with_chaos(ChaosConfig {
24//!         latency_injection: Some((0.1, Duration::from_millis(500))),
25//!         error_injection: Some(0.05),
26//!         ..Default::default()
27//!     })
28//!     .build();
29//!
30//! let handle = harness.spawn(my_daemon).await?;
31//! assert!(handle.health_check().await?.is_healthy());
32//! ```
33
34#![deny(unsafe_code)]
35#![warn(missing_docs)]
36
37pub mod chaos;
38pub mod error;
39pub mod harness;
40pub mod load;
41
42pub use chaos::{ChaosConfig, ChaosInjector};
43pub use error::{Result, TestError};
44pub use harness::DaemonTestHarness;
45pub use load::{LoadTestConfig, LoadTester};