Skip to content

EngineSpec

Namespace: E2E.Engine

public sealed record EngineSpec : IEquatable<EngineSpec>

Upstream’s Engine (engine/index.ts): what an engine author declares, handed to DefineEngine(EngineSpec). Every member is optional; DefineEngine(EngineSpec) validates the combination and computes the capability set.

Inheritance: object

Implements: IEquatable<EngineSpec>

View source

public IReadOnlyList<string>? Actions { get; init; }

The action kinds Perform honors, each once; required with Perform.

Value: IReadOnlyList<string>

public EngineArtifactsSpec? Artifacts { get; init; }

The app’s artifact hooks.

Value: EngineArtifactsSpec

public Func<EngineDisposeContext, Task>? Dispose { get; init; }

Disposes the engine’s worker.

Value: Func<EngineDisposeContext, Task>

public Func<EngineDoctorInfo, Task<IReadOnlyList<EngineDoctorCheck>>>? Doctor { get; init; }

Reports the engine’s readiness checks.

Value: Func<EngineDoctorInfo, Task<IReadOnlyList<EngineDoctorCheck>>>

public Func<EngineCleanupContext, Task>? EndAttempt { get; init; }

Ends an attempt’s isolation, within the cleanup budget.

Value: Func<EngineCleanupContext, Task>

public bool? FileApps { get; init; }

The engine opens an app whose url is a file: URL, read from the disk of the machine the harness runs on. Without it the harness refuses a file app.url at config load.

Value: bool?

public Func<EngineFinishInfo, Task>? Finish { get; init; }

Finishes a run.

Value: Func<EngineFinishInfo, Task>

public IReadOnlyDictionary<string, Delegate>? Fixtures { get; init; }

Fixture factories, by name. A name is lower-camel and not one a universal fixture uses (agent, app, screen, platform, session).

Value: IReadOnlyDictionary<string, Delegate>

public bool? GrantsAllPermissions { get; init; }

The engine grants app.permissions: 'all'. Declared and carried in the manifest; the port does not read it yet (#2213).

Value: bool?

public Func<EngineInitInfo, Task>? Init { get; init; }

Initializes a worker.

Value: Func<EngineInitInfo, Task>

public string? Isolation { get; init; }

How long the state behind the engine’s fixtures, app, and screen lives: Attempt (the default) or Worker.

Value: string

public EngineKeyboardSpec? Keyboard { get; init; }

Input to the focused field; needs Observe.

Value: EngineKeyboardSpec

public bool? LaunchArgumentValues { get; init; }

The engine reads the object form of app.launchArguments from EngineAppInfo.LaunchArgumentValues. Without it the harness refuses an object at config load.

Value: bool?

public Func<LocatorExpression, OperationContext, Task<IReadOnlyList<EngineNode>>>? Locate { get; init; }

Resolves a query against the surface, returning the nodes it matches.

Value: Func<LocatorExpression, OperationContext, Task<IReadOnlyList<EngineNode>>>

public string? Name { get; init; }

The engine’s name, shown in reports and in error messages.

Value: string

public Func<OperationContext, ObserveOptions?, Task<EngineSnapshot>>? Observe { get; init; }

Takes one fresh observation of the surface under test.

Value: Func<OperationContext, ObserveOptions, Task<EngineSnapshot>>

public Func<NodeRef, LocatorAction, OperationContext, Task>? Perform { get; init; }

Performs one locator action on a node of the observation or of a resolution.

Value: Func<NodeRef, LocatorAction, OperationContext, Task>

public Func<Point, PointerAction, OperationContext, Task>? PerformAt { get; init; }

Performs one pointer action at a viewport point, with no node behind it.

Value: Func<Point, PointerAction, OperationContext, Task>

public string? Platform { get; init; }

The platform the engine drives, when it has one.

Value: string

public IReadOnlyList<string>? PointerActions { get; init; }

The pointer action kinds PerformAt honors, each once; required with PerformAt.

Value: IReadOnlyList<string>

public Func<EnginePrepareInfo, Task<EnginePrepareResult?>>? Prepare { get; init; }

Prepares the engine for a run. Returns what prepare learned that the run must honour, or null when it bound nothing.

Value: Func<EnginePrepareInfo, Task<EnginePrepareResult>>

public Func<NodeRef, IReadOnlyList<string>, OperationContext, Task<IReadOnlyDictionary<string, string>>>? ReadStyle { get; init; }

Reads only the requested, allow-listed rendered properties of a node the engine minted, without changing app state; needs Observe. Throw a retryable NODE_STALE if the node no longer binds. The harness redacts the values.

Value: Func<NodeRef, IReadOnlyList<string>, OperationContext, Task<IReadOnlyDictionary<string, string>>>

public IReadOnlyList<Secret>? Secrets { get; init; }

The secrets the engine’s options hold, as handles; each name is kept once.

Value: IReadOnlyList<Secret>

public bool? SelectsDevice { get; init; }

Prepare binds the target to the device EnginePrepareInfo.Device names, for e2e run --device, over the device the engine was configured with; needs Prepare. Declared and carried in the manifest; the port has no --device flag to read it yet (#2213).

Value: bool?

public EngineSessionSpec? Session { get; init; }

The app’s session hooks.

Value: EngineSessionSpec

public Func<EngineCleanupContext, Task>? SettleAttempt { get; init; }

Settles an attempt, rethrowing a failure no step awaited.

Value: Func<EngineCleanupContext, Task>

public int? SpiVersion { get; init; }

The engine contract version the engine was written against; this runner supports SpiVersion.

Value: int?

public Func<EngineAttemptContext, Task>? StartAttempt { get; init; }

Starts an attempt on the engine.

Value: Func<EngineAttemptContext, Task>

public EngineStateSpec? State { get; init; }

The app’s state hooks.

Value: EngineStateSpec

public bool? TapModifiers { get; init; }

Whether the tap actions accept modifier keys; only with Perform.

Value: bool?

public Action<EngineAppDeclaration, EngineAppCheckInfo>? ValidateApp { get; init; }

Checks the app a target declares against what the engine can drive, at config load.

Value: Action<EngineAppDeclaration, EngineAppCheckInfo>

public string? Version { get; init; }

The engine’s version, recorded in reports and used to key saved sessions.

Value: string

public Func<NodeRef, OperationContext, Task<ViewportIntersection>>? ViewportIntersection { get; init; }

Measures how much of a node Locate returned is inside the viewport, for toBeInViewport, without scrolling or changing app state; needs Locate. Throw NODE_STALE if the node no longer binds, and UNSUPPORTED_CAPABILITY for a node whose geometry the platform does not report.

Value: Func<NodeRef, OperationContext, Task<ViewportIntersection>>

public int? Workers { get; init; }

The most workers the engine serves per target.

Value: int?