clnrm_core/
lib.rs

1//! Cleanroom Testing Platform - Hermetic Integration Testing
2//!
3//! A framework for reliable, hermetic integration testing with automatic
4//! container lifecycle management and comprehensive observability.
5//!
6//! This library provides a complete testing platform that tests itself
7//! through the "eat your own dog food" principle - the framework validates
8//! its own functionality using its own capabilities.
9
10pub mod backend;
11pub mod error;
12pub mod policy;
13pub mod scenario;
14pub mod cleanroom;
15pub mod cli;
16pub mod testing;
17pub mod utils;
18pub mod telemetry;
19pub mod macros;
20pub mod assertions;
21pub mod services;
22pub mod config;
23
24pub use error::{CleanroomError, Result};
25pub use policy::{Policy, SecurityLevel, SecurityPolicy};
26pub use scenario::scenario;
27
28#[cfg(feature = "otel-traces")]
29pub use telemetry::{OtelConfig, Export, OtelGuard};
30
31pub use cleanroom::{CleanroomEnvironment, ServicePlugin, ServiceHandle, ServiceRegistry, HealthStatus, ExecutionResult};
32pub use macros::{with_database, with_cache, with_message_queue, with_web_server};
33pub use assertions::{database, cache, email_service, UserAssertions};
34pub use services::surrealdb::SurrealDbPlugin;
35pub use services::generic::GenericContainerPlugin;
36pub use config::{
37    TestConfig, ScenarioConfig, StepConfig, parse_toml_config, load_config_from_file,
38    CleanroomConfig, load_cleanroom_config, load_cleanroom_config_from_file
39};
40
41// The cleanroom_test macro is already exported via #[macro_export] in macros.rs
42
43/// Result of a cleanroom run
44#[derive(Debug)]
45pub struct RunResult {
46    pub success: bool,
47    pub duration_ms: u64,
48    pub output: String,
49    pub error: Option<String>,
50}