Protected_Metadata provider used by the driver for entity access. Set explicitly via the
Provider setter; falls back to the global Metadata.Provider when not set.
The engine (or test harness) should set this to thread a transaction-scoped provider.
Protected_The metadata provider this driver uses. Falls back to the global Metadata.Provider
when the engine hasn't injected an explicit provider — multi-tenant servers should
always set this so each driver run binds to the right database connection.
ProtectedcalculateProtectedCalculate overall score from oracle results.
If weights are provided, calculates weighted average. Otherwise, calculates simple average.
Results from oracle evaluations
Optionalweights: ScoringWeightsOptional scoring weights by oracle type
Overall score from 0.0 to 1.0
ProtectedcreateProtectedCreate a log message for the test execution log.
Log level
Log message
Optionalmetadata: Record<string, unknown>Optional metadata
TestLogMessage object
ProtecteddetermineProtectedDetermine overall test status from oracle results.
Test passes only if ALL oracles pass.
Results from oracle evaluations
'Passed' if all oracles passed, 'Failed' otherwise
Execute the test.
This is the main entry point for test execution. The driver should:
The base engine will handle:
Execution context including test, run, user, options
Promise resolving to execution result
ProtectedgetProtectedGet the effective timeout for a test.
Priority (highest to lowest):
The test entity
Optionalconfig: { maxExecutionTime?: number }Parsed configuration object (optional)
Timeout in milliseconds
ProtectedlogProtectedLog execution progress.
Log message
OptionalverboseOnly: booleanWhether to only log in verbose mode (default: false)
ProtectedlogProtectedLog errors.
Error message
Optionalerror: ErrorOptional error object
ProtectedlogProtectedLog a message to both the console (if verbose) and accumulate for test run log.
Driver execution context
Log level
Log message
Optionalmetadata: Record<string, unknown>Optional metadata
ProtectedparseProtectedParse and validate Configuration JSON.
Helper method for drivers to parse their configuration with type safety. Throws if configuration is invalid.
The configuration type
The test containing the configuration
Parsed configuration
ProtectedparseProtectedParse and validate ExpectedOutcomes JSON.
The expected outcomes type
The test containing the expected outcomes
Parsed expected outcomes
ProtectedparseProtectedParse and validate InputDefinition JSON.
The input definition type
The test containing the input definition
Parsed input definition
Suite-scoped setup (D6). Discovers the two-user RLS fixture ONCE per suite run and
stashes it on the shared SuiteFixtureContext so every test of the suite (and the
rls-isolation bundle's checks) reads the same pair. Best-effort: discovery has
nothing to delete, so failures are non-fatal — Execute lazily re-discovers when the
fixture is absent (e.g. the mj test run path has no suite). Only meaningful on the
server transport (the user cache is a SQLServerDataProvider concept).
The driver arms its own timeout and breaks the check loop when it fires.
Suite-scoped teardown (D6). No-op: the RLS fixture is DISCOVERED (not created), so there is nothing to delete — the safest possible teardown. Present so the engine's suite-hook lifecycle is exercised end-to-end by this driver.
Validate test configuration.
Called when creating or updating a test to ensure the configuration is valid for this test type. Override to add type-specific validation.
The test being validated
Validation result with errors and warnings
Abstract base class for test driver implementations.
Each TestType in the database has a corresponding DriverClass that extends this base. The driver is responsible for:
BaseTestDriver handles common functionality:
Follows pattern from BaseScheduledJob and BaseAgent.
Example