| Crates.io | duende-test |
| lib.rs | duende-test |
| version | 0.2.0 |
| created_at | 2026-01-06 14:14:51.865079+00 |
| updated_at | 2026-01-13 12:17:21.655981+00 |
| description | Testing infrastructure for Duende (harness, chaos injection, load testing) |
| homepage | |
| repository | https://github.com/paiml/duende |
| max_upload_size | |
| id | 2025940 |
| size | 219,468 |
Testing infrastructure for the Duende daemon framework.
This crate provides testing utilities:
use duende_test::{DaemonTestHarness, ChaosConfig};
let harness = DaemonTestHarness::builder()
.with_platform(Platform::Native)
.build();
let handle = harness.spawn(my_daemon).await?;
assert!(handle.health_check().await?.is_healthy());
use duende_test::ChaosConfig;
use std::time::Duration;
let harness = DaemonTestHarness::builder()
.with_chaos(ChaosConfig {
latency_probability: 0.1,
latency_duration: Duration::from_millis(500),
error_probability: 0.05,
..Default::default()
})
.build();
// Daemon should remain healthy under chaos
let handle = harness.spawn(my_daemon).await?;
tokio::time::sleep(Duration::from_secs(30)).await;
assert!(handle.health_check().await?.is_healthy());
use duende_test::{LoadTester, LoadTestConfig};
let tester = LoadTester::new();
let config = LoadTestConfig::stress();
let report = tester.run(config).await?;
assert!(report.passed());
println!("P99 latency: {:?}", report.latency_p99);
| Feature | Description |
|---|---|
falsification |
Enable 110 Popperian falsification tests |
MIT OR Apache-2.0