clik-engine API
    Preparing search index...

    Interface Scenario

    Describes one harness run: the ScenarioStrategy driving inputs, a hard frame cap, plus optional abort, metrics, and tagging hooks.

    interface Scenario {
        collectMetrics?: (ctx: ScenarioContext) => Record<string, unknown>;
        fixedDeltaMs?: number;
        maxFrames: number;
        shouldAbort?: (ctx: ScenarioContext) => string | boolean | undefined;
        startScene?: string;
        strategy: ScenarioStrategy;
        tags?: string[];
    }
    Index

    Properties

    collectMetrics?: (ctx: ScenarioContext) => Record<string, unknown>

    Called once at the end of the run (success or abort) to collect metrics that land in RunResult.metrics.

    fixedDeltaMs?: number

    Fixed delta in ms per frame (default 16.666 ≈ 60 fps).

    maxFrames: number

    Hard cap on frames per run. Required so a stuck run can't hang the harness.

    shouldAbort?: (ctx: ScenarioContext) => string | boolean | undefined

    Return a truthy value (or a string reason) to end the run early. Called once per frame after the step.

    startScene?: string

    Optional scene key to start before the run begins.

    Strategy that drives inputs. Required.

    tags?: string[]

    Free-form tags for filtering reports.