Sign in

    moonrockz/moonspec/runner does not have a README file

    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) -> Unit raise

    Load a feature from any FeatureSource variant.

    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.
    impl Eq for FeatureResult

    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

    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

    RunResult

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

    Complete result of a test run.
    impl Eq for RunResult
    impl Show for RunResult

    RunSummary

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

    Summary of an entire run.
    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
    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
    }

    Result of executing a single step.
    impl Eq for StepResult
    impl Show for StepResult

    StepStatus

    pub(all) enum StepStatus {
    Passed
    Failed(String)
    Skipped
    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.

    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
    ]) -> ScenarioResult

    Execute a single scenario from a compiled Pickle.

    execute_scenario_with_hooks

    fn[W :
    Hooks
    ] execute_scenario_with_hooks(world : W, registry :
    StepRegistry
    , feature_name~ : String, scenario_name~ : String, pickle_id~ : String, tags~ : Array[String], steps~ : Array[
    PickleStep
    ]) -> ScenarioResult

    Execute a single scenario with lifecycle hooks. Calls before/after_scenario and before/after_step on the world.

    run

    async fn[W :
    World
    ] run(factory : () -> W, features : Array[FeatureSource], tag_expr? : String, scenario_name? : String, parallel? : Int) -> 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.

    run_with_hooks

    async fn[W :
    World
    +
    Hooks
    ] run_with_hooks(factory : () -> W, features : Array[FeatureSource], tag_expr? : String, scenario_name? : String, parallel? : Int) -> RunResult

    Run all features with lifecycle hooks and collect results.

    Like run, but calls before/after_scenario and before/after_step hooks on the world. The world must implement both World and Hooks traits.

    runner_version

    fn runner_version() -> String

    moonspec runner — Scenario execution and lifecycle.