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 assertions;
11pub mod backend;
12pub mod cleanroom;
13pub mod cli;
14pub mod config;
15pub mod error;
16pub mod macros;
17pub mod marketplace;
18pub mod policy;
19pub mod scenario;
20pub mod services;
21pub mod telemetry;
22pub mod utils;
23pub mod validation;
24
25// Testing utilities (includes property-based test generators)
26pub mod testing;
27
28pub use error::{CleanroomError, Result};
29pub use policy::{Policy, SecurityLevel, SecurityPolicy};
30pub use scenario::scenario;
31
32#[cfg(feature = "otel-traces")]
33pub use telemetry::{Export, OtelConfig, OtelGuard};
34
35pub use assertions::{cache, database, email_service, UserAssertions};
36pub use cleanroom::{
37    CleanroomEnvironment, ExecutionResult, HealthStatus, ServiceHandle, ServicePlugin,
38    ServiceRegistry,
39};
40pub use config::{
41    load_cleanroom_config, load_cleanroom_config_from_file, load_config_from_file,
42    parse_toml_config, CleanroomConfig, ScenarioConfig, StepConfig, TestConfig,
43};
44pub use macros::{with_cache, with_database, with_message_queue, with_web_server};
45pub use services::generic::GenericContainerPlugin;
46pub use services::surrealdb::SurrealDbPlugin;
47pub use validation::otel::{OtelValidationConfig, OtelValidator, SpanAssertion, TraceAssertion};
48
49// The cleanroom_test macro is already exported via #[macro_export] in macros.rs
50
51/// Result of a cleanroom run
52#[derive(Debug)]
53pub struct RunResult {
54    pub success: bool,
55    pub duration_ms: u64,
56    pub output: String,
57    pub error: Option<String>,
58}