momus-core
Generic API test harness — AST types, assertion evaluation, plan runner, template resolution.
What is this?
momus-core is the foundational crate of the Momus ecosystem. It defines the core data model (AST types for test plans, steps, and assertions), the assertion evaluation engine, the plan runner, template resolution for dynamic values, the transport adapter trait for multi-protocol support, and the Rhai-based script engine.
Key Features
- Composable Assertion AST —
all_of,any_of,not,status,status_in,header,body_length,content_type,valid_json,json_path,schema - JSONPath Predicates —
exists,not_exists,eq,not_eq,cmp,length,count,every,some,schema - Step Types —
request,sequence,parallel,script,noop - Template Resolution —
{base_url},{steps.<name>.<field>}substitution in URLs, headers, and bodies - Transport Adapter —
TransportAdaptertrait with built-inHttpAdapter(reqwest-based) - Script Engine — Rhai-based scripting for custom logic
- JSON Schema Validation — via
jsonschemacrate - Plan Runner — executes test plans and produces structured
RunReport
Usage
use *;
use runner;
use HttpAdapter;
async
Part of the Momus project — a generic API test harness with a composable assertion AST.