Member Junction
    Preparing search index...

    Context for test driver execution

    interface DriverExecutionContext {
        contextUser: UserInfo;
        fixtures?: SuiteFixtureContext;
        options: TestRunOptions;
        oracleRegistry: Map<string, IOracle>;
        resolvedVariables?: ResolvedTestVariables;
        suiteContext?: { applicationContext?: string; [key: string]: unknown };
        test: MJTestEntity;
        testRun: MJTestRunEntity;
        workerIndex?: number;
    }
    Index

    Properties

    contextUser: UserInfo

    User context for data access

    Suite-scoped fixtures established by the driver's SetupSuite before the first test of the suite runs, threaded into every Execute of that suite run and torn down (guaranteed) by TeardownSuite. Keyed by SuiteRunID.

    Undefined for the standalone RunTest path (no suite ⇒ no suite hooks fire), so fixture-dependent tests must be run via mj test suite.

    Runtime options

    oracleRegistry: Map<string, IOracle>

    Oracle registry for evaluations

    resolvedVariables?: ResolvedTestVariables

    Resolved variable values for this execution. Variables have been resolved through the hierarchy and validated. May be undefined if no variables are defined for this test type.

    suiteContext?: { applicationContext?: string; [key: string]: unknown }

    Suite-level signals propagated from TestSuite.Configuration to every test in the suite. applicationContext is the primary use case — a markdown blob describing the app under test that drivers feed to the controller LLM so it doesn't rediscover app structure on every test.

    Undefined when the test is not running inside a suite, or when the suite's Configuration field is empty / malformed (a malformed JSON produces a warning and undefined here — the run still proceeds).

    Drivers may also read other keys from this bag if the suite author stores arbitrary signals (e.g., feature flags, environment tags) under TestSuite.Configuration. The shape is intentionally open-ended.

    Test definition

    Test run entity (for bidirectional linking)

    workerIndex?: number

    Worker index for parallel suite execution. When set, indicates this test is running in a parallel worker and drivers can use it to construct session-sharing keys (e.g. "suite::worker-"). Undefined in sequential execution.