Crate clnrm_core

Crate clnrm_core 

Source
Expand description

Cleanroom Testing Platform - Hermetic Integration Testing

A framework for reliable, hermetic integration testing with automatic container lifecycle management and comprehensive observability.

This library provides a complete testing platform that tests itself through the “eat your own dog food” principle - the framework validates its own functionality using its own capabilities.

Re-exports§

pub use testing::FrameworkTestResults;
pub use testing::SuiteResult;
pub use testing::TestResult as TestingTestResult;
pub use error::CleanroomError;
pub use error::Result;
pub use policy::Policy;
pub use policy::SecurityLevel;
pub use policy::SecurityPolicy;
pub use scenario::scenario;
pub use telemetry::weaver_controller::ValidationReport as WeaverValidationReport;
pub use telemetry::weaver_controller::ValidationStatus;
pub use telemetry::weaver_controller::WeaverConfig;
pub use telemetry::weaver_controller::WeaverController;
pub use telemetry::Export;
pub use telemetry::OtelConfig;
pub use telemetry::OtelGuard;
pub use telemetry::weaver_coordination::Running;
pub use telemetry::weaver_coordination::Stopped;
pub use telemetry::weaver_coordination::Unstarted;
pub use telemetry::weaver_coordination::WeaverConfig as TypeSafeWeaverConfig;
pub use telemetry::weaver_coordination::WeaverController as TypeSafeWeaverController;
pub use assertions::cache;
pub use assertions::database;
pub use assertions::email_service;
pub use assertions::UserAssertions;
pub use cache::Cache;
pub use cache::CacheManager;
pub use cache::CacheStats;
pub use cache::FileCache;
pub use cache::MemoryCache;
pub use cleanroom::CleanroomEnvironment;
pub use cleanroom::ExecutionResult;
pub use cleanroom::HealthStatus;
pub use cleanroom::ServiceHandle;
pub use cleanroom::ServicePlugin;
pub use cleanroom::ServiceRegistry;
pub use config::load_cleanroom_config;
pub use config::load_cleanroom_config_from_file;
pub use config::load_config_from_file;
pub use config::parse_toml_config;
pub use config::CleanroomConfig;
pub use config::DeterminismConfig;
pub use config::ScenarioConfig;
pub use config::StepConfig;
pub use config::TestConfig;
pub use determinism::DeterminismEngine;
pub use formatting::format_test_results;
pub use formatting::format_toml_content;
pub use formatting::format_toml_file;
pub use formatting::needs_formatting;
pub use formatting::Formatter;
pub use formatting::FormatterType;
pub use formatting::HumanFormatter;
pub use formatting::JsonFormatter;
pub use formatting::JunitFormatter;
pub use formatting::TapFormatter;
pub use formatting::TestResult;
pub use formatting::TestStatus;
pub use formatting::TestSuite;
pub use macros::with_cache;
pub use macros::with_database;
pub use macros::with_message_queue;
pub use macros::with_web_server;
pub use reporting::generate_reports;
pub use reporting::DigestReporter;
pub use reporting::JsonReporter;
pub use reporting::JunitReporter;
pub use reporting::ReportConfig;
pub use services::generic::GenericContainerPlugin;
pub use services::surrealdb::SurrealDbPlugin;
pub use validation::otel::OtelValidationConfig;
pub use validation::otel::OtelValidator;
pub use validation::otel::SpanAssertion;
pub use validation::otel::TraceAssertion;
pub use validation::PrdExpectations;
pub use validation::ShapeValidator;
pub use validation::ValidationReport;
pub use watch::debouncer::FileDebouncer;
pub use watch::WatchConfig;
pub use coverage::manifest::BehaviorManifest;
pub use coverage::manifest::Dimensions;
pub use coverage::manifest::SystemInfo;
pub use coverage::report::ReportFormat;
pub use coverage::report::ReportGenerator;
pub use coverage::tracker::CoverageTracker;
pub use coverage::BehaviorCoverage;
pub use coverage::BehaviorCoverageReport;
pub use coverage::DimensionCoverage;
pub use coverage::DimensionWeights;
pub use coverage::StateTransition;
pub use coverage::UncoveredBehaviors;

Modules§

assertions
Rich assertion library for domain-specific checks
backend
Backend implementations for cleanroom testing
cache
Cache module for change-aware test execution
chaos
Chaos engineering orchestration module
cleanroom
Cleanroom Environment - Framework Self-Testing Implementation
cli
CLI module for the cleanroom testing framework
config
Configuration system for cleanroom testing
coverage
Behavior Coverage Tracking for clnrm
determinism
Determinism engine for reproducible test execution
error
Error types for cleanroom testing framework
formatting
Formatting Module for Cleanroom v0.7.0
macros
Jane-friendly macros for cleanroom testing
otel
OpenTelemetry integration for fake-green detection
policy
Policy enforcement for cleanroom testing
reporting
Report generation for test results
scenario
Scenario DSL for multi-step test orchestration
services
telemetry
Minimal, happy-path OpenTelemetry bootstrap for clnrm. OpenTelemetry is always enabled and compiled into the framework.
testing
Testing utilities and helpers for CLNRM
utils
Utility functions and helpers for the cleanroom framework
validation
Validation module for cleanroom testing framework
watch
File watching subsystem for auto-test execution

Macros§

cleanroom_test
Jane-friendly test macro that handles all the boilerplate

Structs§

RunResult
Result of a cleanroom run
TemplateContext
Template context with vars, matrix, otel namespaces
TemplateDeterminismConfig
Configuration for deterministic test execution
TemplateRenderer
Template renderer with Tera engine

Enums§

TemplateError
Template rendering errors

Functions§

get_cached_template_renderer
Get a cached template renderer instance This avoids recompiling Tera templates on every use for better performance
is_template
Check if file content should be treated as a template
render_template
Convenience functions for simple template rendering
render_template_file
Render template file with user variables and PRD v1.0 defaults