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