Skip to content

EngineStartOptions

Namespace: E2E.Engine

public sealed class EngineStartOptions

Passed to CancellationToken) once per test attempt.

Inheritance: object

View source

public TimeSpan ActionTimeout { get; init; }

Value: TimeSpan

View source

public Action<AppLogEntry>? AppLog { get; init; }

Takes one line of what the app did on its own, such as console output, an exception nothing caught, or a failed request, for the attempt’s trace. Upstream’s EngineAttemptContext.appLog. An engine may report from the moment it starts, before any step records; the harness redacts and bounds each line, and a sink that throws never fails the attempt.

Value: Action<AppLogEntry>

View source

public string? ArtifactsDir { get; init; }

The attempt’s artifact directory: where a recording of the attempt is written, under video. Upstream’s EngineAttemptContext.artifactsDir. An engine that records video needs it.

Value: string

View source

public string? AttemptId { get; init; }

The attempt’s id, for naming what an engine leases for it at a hosted service. Defaults to a new one per start. Upstream’s EngineAttemptContext.attemptId.

Value: string

View source

public string? BaseUrl { get; init; }

Value: string

View source

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

The run’s environment: where a hosted service’s provider reads its token from, with what the engine’s prepare left in it. An engine that leases for the one attempt it starts, as WebEngine does, reads it to prepare that run; it defaults to the process environment.

Value: IReadOnlyDictionary<string, string>

View source

public Action<IReadOnlyDictionary<string, string>>? Environment { get; init; }

Takes the facts the engine learns about what the attempt runs on, such as the browser and its user agent, for the attempt’s trace. Upstream’s EngineAttemptContext.environment. An engine tells it at most a few times an attempt, and never fails the attempt for it.

Value: Action<IReadOnlyDictionary<string, string>>

View source

public Action<string>? Navigation { get; init; }

Takes one line saying where the app went on its own, such as navigated to /checkout or the app opened a new tab at /help. Upstream’s EngineAttemptContext.navigation. A navigation the engine started itself is not told: its step says it.

Value: Action<string>

View source

public string? ProjectRoot { get; init; }

Anchors the files the engine options name, such as an init script’s Path. Defaults to the working directory.

Value: string

View source

public Action<Observation>? Screen { get; init; }

Takes the screen an action left, for the attempt’s trace. Upstream’s EngineAttemptContext.screen. Null when the attempt keeps no trace, and an engine then takes no screen. An engine may read the screen on the action’s path; it never fails the action for it, and a sink that throws never fails the attempt.

Value: Action<Observation>

View source