moonrockz/moonspec/runner does not have a README file

    SyncExecutionError

    pub suberror SyncExecutionError {
    ParallelNotSupported
    HostIoFailed(operation~ : String, path~ : String, message~ : String)
    } derive(
    Debug
    )

    An execution option or host operation unsupported by synchronous execution.

    TagExpressionError

    pub(all) suberror TagExpressionError {
    UnexpectedEnd(expression~ : String)
    UnexpectedToken(expression~ : String, token~ : String)
    UnclosedParen(expression~ : String)
    } derive(Eq,
    Debug
    )

    A syntax error in a tag expression.

    Every variant carries the whole expression, so the message can show it.

    TagExpressionError::equal

    TagExpressionError::not_equal

    TagExpressionError::output

    fn TagExpressionError::output(self : TagExpressionError, logger : &Logger) -> Unit

    TagExpressionError::to_string

    fn TagExpressionError::to_string(self : TagExpressionError) -> String

    CollectorSink

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

    Test helper that collects all envelopes into an array.

    CollectorSink::new

    CollectorSink::on_message

    CollectorSink::output

    fn CollectorSink::output(_self : CollectorSink) -> String

    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
    } derive(
    Debug
    )

    Result of executing a feature.

    FeatureSource

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

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

    FeatureSource::equal

    FeatureSource::not_equal

    fn FeatureSource::not_equal(x : FeatureSource, y : FeatureSource) -> Bool

    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)
    } derive(Eq,
    Debug
    )

    Destination for formatter output.

    OutputDest::equal

    fn OutputDest::equal(OutputDest, OutputDest) -> Bool

    OutputDest::not_equal

    fn OutputDest::not_equal(x : OutputDest, y : OutputDest) -> Bool

    ParseErrorInfo

    pub(all) struct ParseErrorInfo {
    uri : String
    message : String
    line : Int?
    } derive(Eq,
    Debug
    )

    Information about a parse error encountered when loading a feature.

    ParseErrorInfo::equal

    ParseErrorInfo::not_equal

    fn ParseErrorInfo::not_equal(x : ParseErrorInfo, y : ParseErrorInfo) -> Bool

    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
    }

    Options for configuring a test run.

    RunOptions::RunOptions

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

    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. Case and step hooks are skipped; run hooks still execute. 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_no_color

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

    Get the configured no_color value.

    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 async parallel execution. Ignored when parallel execution is disabled.

    RunOptions::no_color

    fn RunOptions::no_color(self : RunOptions, no_color : Bool) -> Unit

    Turn off ANSI colors in the run_or_fail failure report.

    This is the compiled default. At runtime, MOONSPEC_COLOR=always|never and NO_COLOR override it (see @core.color_enabled).

    RunOptions::parallel

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

    Enable or disable parallel execution for the async runner. Synchronous runners reject true before any run effects.

    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]
    } derive(
    Debug
    )

    Complete result of a test run.

    RunSummary

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

    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.

    RunSummary::equal

    fn RunSummary::equal(RunSummary, RunSummary) -> Bool

    RunSummary::not_equal

    fn RunSummary::not_equal(x : RunSummary, y : RunSummary) -> Bool

    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
    } derive(
    Debug
    )

    Result of executing a scenario.

    ScenarioStatus

    pub(all) enum ScenarioStatus {
    Passed
    Failed
    Skipped(String?)
    Undefined
    Pending
    } derive(Eq,
    Debug
    )

    Aggregate status of a scenario.

    ScenarioStatus::equal

    ScenarioStatus::from_steps

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

    Derive scenario status from step statuses.

    ScenarioStatus::not_equal

    fn ScenarioStatus::not_equal(x : ScenarioStatus, y : ScenarioStatus) -> Bool

    StepResult

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

    Result of executing a single step.

    StepStatus

    pub(all) enum StepStatus {
    Passed
    Failed(String)
    Skipped(String?)
    Undefined
    Pending
    } derive(Eq,
    Debug
    )

    Status of a single step execution.

    StepStatus::equal

    fn StepStatus::equal(StepStatus, StepStatus) -> Bool

    StepStatus::is_passed

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

    Check if a step passed.

    StepStatus::not_equal

    fn StepStatus::not_equal(x : StepStatus, y : StepStatus) -> Bool

    TagExpression

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

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

    TagExpression::equal

    TagExpression::matches

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

    Evaluate whether this expression matches a given set of tags.

    TagExpression::not_equal

    fn TagExpression::not_equal(x : TagExpression, y : TagExpression) -> Bool

    TagExpression::parse

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

    Parse a tag expression string into a TagExpression AST. An empty or whitespace-only string yields Always which matches any set of tags. Malformed input raises a TagExpressionError.

    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_or_fail_sync

    fn[W :
    World
    ] run_or_fail_sync(factory : () -> W, options : RunOptions) -> Unit raise

    Run features synchronously, raising a structured report for any failure.

    run_sync

    fn[W :
    World
    ] run_sync(factory : () -> W, options : RunOptions) -> RunResult raise

    Run features sequentially without an event loop. Rejects parallel execution before effects. Formatter file and stderr write failures raise SyncExecutionError::HostIoFailed.