moonrockz/moonspec/runner does not have a README file

    CollectorSink

    pub(all) struct CollectorSink {
    envelopes : Array[
    Envelope
    ]
    }

    Test helper that collects all envelopes into an array.

    CollectorSink::new

    FeatureCache

    pub struct FeatureCache {
    // private fields
    }

    In-memory cache of parsed Gherkin features, keyed by path. Mutation is controlled — only load_* methods can add entries.

    FeatureCache::contains

    fn FeatureCache::contains(self : FeatureCache, path : String) -> Bool

    Check if a path is cached.

    FeatureCache::features

    Return all cached features as (path, feature) pairs.

    FeatureCache::get

    Look up a cached feature by path.

    FeatureCache::length

    fn FeatureCache::length(self : FeatureCache) -> Int

    Number of cached features.

    FeatureCache::load_file

    fn FeatureCache::load_file(self : FeatureCache, path : String) -> Unit raise

    Load a feature from a file path. Idempotent — skips if already cached.

    FeatureCache::load_from_source

    fn FeatureCache::load_from_source(self : FeatureCache, source : FeatureSource) -> Array[ParseErrorInfo]

    Load a feature from any FeatureSource variant. Returns an array of parse errors (empty on success).

    FeatureCache::load_parsed

    fn FeatureCache::load_parsed(self : FeatureCache, path : String, feature :
    Feature
    ) -> Unit

    Store a pre-parsed feature directly.

    FeatureCache::load_text

    fn FeatureCache::load_text(self : FeatureCache, path : String, content : String) -> Unit raise

    Load a feature from inline text. Always overwrites existing entry.

    FeatureCache::new

    Create an empty feature cache.

    FeatureResult

    pub(all) struct FeatureResult {
    name : String
    scenarios : Array[ScenarioResult]
    duration_ms : Int64
    }

    Result of executing a feature.

    FeatureSource

    pub(all) enum FeatureSource {
    Text(String, String)
    File(String)
    Parsed(String,
    Feature
    )
    }

    Input source for a feature to be loaded into the cache.
    impl Eq for FeatureSource

    FormatterEntry

    pub(all) struct FormatterEntry {
    sink : &
    MessageSink

    dest : OutputDest
    }

    A formatter paired with its output destination.

    IdGenerator

    pub(all) struct IdGenerator {
    // private fields
    }

    ID generator for test planning.

    IdGenerator::new

    IdGenerator::next

    fn IdGenerator::next(self : IdGenerator, prefix : String) -> String

    IdGenerator::next_hook_id

    fn IdGenerator::next_hook_id(self : IdGenerator) -> String

    IdGenerator::next_param_type_id

    fn IdGenerator::next_param_type_id(self : IdGenerator) -> String

    OutputDest

    pub(all) enum OutputDest {
    Stdout
    Stderr
    File(String)
    }

    Destination for formatter output.
    impl Eq for OutputDest
    impl Show for OutputDest

    ParseErrorInfo

    pub(all) struct ParseErrorInfo {
    uri : String
    message : String
    line : Int?
    }

    Information about a parse error encountered when loading a feature.

    PickleFilter

    pub struct PickleFilter {
    tag_expression : TagExpression
    scenario_names : Array[String]
    }

    Filter compiled pickles by tags, names, or URI+line.

    PickleFilter::apply

    Apply all active filters. Filters are AND'd.

    PickleFilter::new

    PickleFilter::with_names

    fn PickleFilter::with_names(self : PickleFilter, names : Array[String]) -> PickleFilter

    PickleFilter::with_tags

    fn PickleFilter::with_tags(self : PickleFilter, expr : String) -> PickleFilter raise

    RunOptions

    pub(all) struct RunOptions {
    // private fields

    fn new(features : Array[FeatureSource]) -> RunOptions
    }

    Options for configuring a test run.

    RunOptions::add_formatter

    fn RunOptions::add_formatter(self : RunOptions, sink : &
    MessageSink
    , dest : OutputDest) -> Unit

    Add a formatter with its output destination.

    RunOptions::add_sink

    Add a message sink for envelope output.

    RunOptions::clear_sinks

    fn RunOptions::clear_sinks(self : RunOptions) -> Unit

    Remove all sinks and formatters.

    RunOptions::dry_run

    fn RunOptions::dry_run(self : RunOptions, value : Bool) -> Unit

    Enable or disable dry-run mode.

    When enabled, steps are matched against definitions but handlers are not executed. All hooks are skipped. Matched steps report as Skipped(Some("dry run")) and undefined steps remain Undefined.

    let opts = RunOptions::new(features)
    opts.dry_run(true) // validate step wiring without execution

    RunOptions::features

    fn RunOptions::features(self : RunOptions) -> Array[FeatureSource]

    Get the feature sources.

    RunOptions::get_formatters

    fn RunOptions::get_formatters(self : RunOptions) -> Array[FormatterEntry]

    Get the configured formatters.

    RunOptions::get_max_concurrent

    fn RunOptions::get_max_concurrent(self : RunOptions) -> Int

    Get the max concurrent limit.

    RunOptions::get_retries

    fn RunOptions::get_retries(self : RunOptions) -> Int

    Get the global retry count for failed scenarios.

    RunOptions::get_scenario_name

    fn RunOptions::get_scenario_name(self : RunOptions) -> String

    Get the scenario name filter.

    RunOptions::get_sinks

    Get the configured sinks.

    RunOptions::get_skip_tags

    fn RunOptions::get_skip_tags(self : RunOptions) -> Array[String]

    Get the configured skip tags.

    RunOptions::get_tag_expr

    fn RunOptions::get_tag_expr(self : RunOptions) -> String

    Get the tag expression filter.

    RunOptions::is_dry_run

    fn RunOptions::is_dry_run(self : RunOptions) -> Bool

    Check if dry-run mode is enabled.

    RunOptions::is_parallel

    fn RunOptions::is_parallel(self : RunOptions) -> Bool

    Check if parallel execution is enabled.

    RunOptions::max_concurrent

    fn RunOptions::max_concurrent(self : RunOptions, value : Int) -> Unit

    Set maximum concurrent scenarios for parallel execution.

    RunOptions::new

    fn RunOptions::new(features : Array[FeatureSource]) -> RunOptions

    RunOptions::parallel

    fn RunOptions::parallel(self : RunOptions, value : Bool) -> Unit

    Enable or disable parallel execution.

    RunOptions::retries

    fn RunOptions::retries(self : RunOptions, value : Int) -> Unit

    Set the global retry count for failed scenarios.

    When a scenario fails, it will be re-executed up to value additional times. A fresh World instance is created for each attempt. Only the final attempt's result counts toward the run summary.

    Per-scenario @retry(N) tags override this global setting. Negative values are clamped to 0.

    let opts = RunOptions::new(features)
    opts.retries(2) // retry failed scenarios up to 2 times

    RunOptions::scenario_name

    fn RunOptions::scenario_name(self : RunOptions, value : String) -> Unit

    Set a scenario name filter.

    RunOptions::skip_tags

    fn RunOptions::skip_tags(self : RunOptions, tags : Array[String]) -> Unit

    Set the tags that cause scenarios to be skipped.

    Scenarios with any of these tags are skipped without executing steps or hooks. Tags may include a reason: @skip("reason"). The reason is extracted and attached to the skip status.

    Defaults to ["@skip", "@ignore"].

    let opts = RunOptions::new(features)
    opts.skip_tags(["@skip", "@ignore", "@wip"])

    RunOptions::tag_expr

    fn RunOptions::tag_expr(self : RunOptions, value : String) -> Unit

    Set a tag expression filter.

    RunResult

    pub(all) struct RunResult {
    features : Array[FeatureResult]
    summary : RunSummary
    parse_errors : Array[ParseErrorInfo]
    }

    Complete result of a test run.
    impl Show for RunResult

    RunSummary

    pub(all) struct RunSummary {
    total_scenarios : Int
    passed : Int
    failed : Int
    undefined : Int
    pending : Int
    skipped : Int
    retried : Int
    duration_ms : Int64
    }

    Summary of an entire run.

    The retried field counts scenarios that required more than one attempt, regardless of their final outcome. A scenario that fails on the first attempt but passes on retry is counted as both passed and retried.
    impl Eq for RunSummary
    impl Show for RunSummary

    ScenarioResult

    pub(all) struct ScenarioResult {
    feature_name : String
    scenario_name : String
    pickle_id : String
    tags : Array[String]
    steps : Array[StepResult]
    status : ScenarioStatus
    duration_ms : Int64
    }

    Result of executing a scenario.

    ScenarioStatus

    pub(all) enum ScenarioStatus {
    Passed
    Failed
    Skipped(String?)
    Undefined
    Pending
    }

    Aggregate status of a scenario.

    ScenarioStatus::from_steps

    fn ScenarioStatus::from_steps(steps : Array[StepStatus]) -> ScenarioStatus

    Derive scenario status from step statuses.

    StepResult

    pub(all) struct StepResult {
    text : String
    keyword : String
    status : StepStatus
    duration_ms : Int64
    diagnostic : Error?
    }

    Result of executing a single step.
    impl Show for StepResult

    StepStatus

    pub(all) enum StepStatus {
    Passed
    Failed(String)
    Skipped(String?)
    Undefined
    Pending
    }

    Status of a single step execution.
    impl Eq for StepStatus
    impl Show for StepStatus

    StepStatus::is_passed

    fn StepStatus::is_passed(self : StepStatus) -> Bool

    Check if a step passed.

    TagExpression

    pub(all) enum TagExpression {
    TagLiteral(String)
    Not(TagExpression)
    And(TagExpression, TagExpression)
    Or(TagExpression, TagExpression)
    Always
    }

    A boolean expression over tags, supporting and, or, not, parentheses, and bare @tag literals.
    impl Eq for TagExpression

    TagExpression::matches

    fn TagExpression::matches(self : TagExpression, tags : Array[String]) -> Bool

    Evaluate whether this expression matches a given set of tags.

    TagExpression::parse

    fn TagExpression::parse(input : String) -> TagExpression raise

    Parse a tag expression string into a TagExpression AST. An empty string yields Always which matches any set of tags.

    build_step_definition_envelopes

    Build StepDefinition envelopes from the shared registry.

    build_test_cases

    Build TestCase envelopes by matching pickle steps against a shared registry.

    compile_pickles

    Compile all cached features into Pickle instances. This is the main entry point for the pickle compiler.

    execute_scenario

    fn execute_scenario(registry :
    StepRegistry
    , feature_name~ : String, scenario_name~ : String, pickle_id~ : String, tags~ : Array[String], steps~ : Array[
    PickleStep
    ], hook_registry? :
    HookRegistry
    , sinks? : Array[&
    MessageSink
    ], test_case_started_id? : String, test_step_ids? : Array[String], dry_run? : Bool) -> ScenarioResult

    Execute a single scenario from a compiled Pickle.

    When a hook_registry is provided (and contains hooks), lifecycle hooks are called at the appropriate points: before/after test case and before/after each test step.

    run

    async fn[W :
    World
    ] run(factory : () -> W, options : RunOptions) -> RunResult

    Run all features and collect results.

    A fresh world is created per scenario via factory() for isolation. When parallel is greater than 0, pickles are executed concurrently using @async.all() with bounded concurrency. Otherwise, pickles run sequentially. Lifecycle hooks registered via Setup are called automatically when present.

    run_or_fail

    async fn[W :
    World
    ] run_or_fail(factory : () -> W, options : RunOptions) -> Unit

    Run all features, raising MoonspecError on any failure.

    This is the ergonomic test API. Use in generated tests and manual tests where you want structured error output instead of manual result inspection.