Skip to main content

Crate momus

Crate momus 

Source
Expand description

Momus — generic API test harness with a composable assertion AST.

This is the umbrella crate that re-exports all Momus sub-crates and provides convenience APIs for building and running test plans.

§Quick Start

use momus::prelude::*;
use momus::builder::*;

let plan = TestPlanBuilder::new("health check")
    .base_url("http://localhost:8080")
    .step(
        request("health")
            .get("/health")
            .assert(Assertion::Status(200))
            .assert(Assertion::valid_json())
            .build(),
    )
    .build();

assert_eq!(plan.total_tests(), 1);

§Crate Structure

CratePurpose
momus-coreAST types, assertion evaluation, plan runner, template resolution
momus-mockConfigurable mock HTTP server
momus-convertConvert API descriptions (OpenAPI, Postman, HAR, cURL, etc.) into test plans
momus-benchLoad testing engine — steady, max-throughput, soak modes
momus-fuzzPayload mutation engine — boundary, encoding, type mismatch, cardinality
momus-cliCLI binary (momus run, momus validate, momus mock, momus bench, momus fuzz, momus convert)
momus (this)Umbrella crate with re-exports, builder, and convenience APIs

Re-exports§

pub use momus_bench;
pub use momus_chaos;
pub use momus_contract;
pub use momus_convert;
pub use momus_core;
pub use momus_diff;
pub use momus_fuzz;
pub use momus_guard;
pub use momus_mock;

Modules§

builder
Programmatic builder for constructing test plans.
prelude
Convenience re-exports for common Momus types.

Functions§

load_plan
Convenience function to load a TestPlan from a JSON file.
parse_plan
Convenience function to load a TestPlan from a JSON string.
validate_plan
Convenience function to validate a test plan without running it.