Skip to content

E2ESessionOptions

Namespace: E2E

public sealed class E2ESessionOptions

How to open one E2ESession. Retries set Attempt above 1 so the cache records but does not replay, except under CacheStrict, where every attempt replays.

Inheritance: object

View source

public TimeSpan ActionTimeout { get; init; }

Value: TimeSpan

View source

public string? Agent { get; init; }

The agent a call that names none uses, upstream’s agent option of a test or run. Unset, it is default. An unknown name is INVALID_ARGUMENT.

Value: string

View source

public string? AgentContext { get; init; }

The default agent’s upstream context: told to every model call, at most 16384 UTF-8 bytes.

Value: string

View source

public IStepExecutor? AgentExecutor { get; init; }

The default agent’s custom brain, upstream’s executor. See Executor.

Value: IStepExecutor

View source

public string? AgentSystem { get; init; }

The default agent’s upstream system: text appended to the act rules. Judges never see it.

Value: string

View source

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

The default agent’s project tools, offered to the model beside the agent’s own. See Tools.

Value: IReadOnlyDictionary<string, AgentTool>

View source

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

Named agents besides the default one, picked per call with the Agent option. Each starts from the built-in defaults, not from the default agent.

Value: IReadOnlyDictionary<string, AgentOptions>

View source

public bool AiTrace { get; init; }

E2E_AI_TRACE=1, the port’s counterpart of --ai-trace: every model call of the test is recorded in the AI SDK devtools shape and added to ai-trace-<process id>.json next to the results directory (.e2e by default) when the session is released.

Value: bool

View source

public TimeSpan AssertionTimeout { get; init; }

Value: TimeSpan

View source

public int Attempt { get; init; }

1 is the first try. Later attempts do not replay, and still record verified acts.

Value: int

View source

public string? BaseUrl { get; init; }

Value: string

View source

public IStepCache? Cache { get; init; }

Value: IStepCache

View source

public bool CacheEnabled { get; init; }

Value: bool

View source

public CacheMode CacheMode { get; init; }

ReadOnly replays but never writes or deletes recordings.

Value: CacheMode

View source

public bool CacheStrict { get; init; }

When true, a recording that no longer matches fails the act with REPLAY_STALE. So does a no-entry miss while a FileStepCache holds a recording of the same step under another key. Retries replay too, and the session never writes or deletes a recording, whatever CacheMode says.

Value: bool

View source

public TimeSpan CleanupTimeout { get; init; }

How long the engine may take to shut down on dispose. Upstream cleanupTimeout.

Value: TimeSpan

View source

public bool Debug { get; init; }

E2E_DEBUG=1, the port’s counterpart of --debug: the session times its phases and the agent’s observe, model, and action phases, writes the table to stderr when it is released, and keeps each agent step’s transcript.

Value: bool

View source

public required IEngine Engine { get; init; }

Value: IEngine

View source

public IAgentModel? Judge { get; init; }

The default agent’s judge for assert, waitFor, and extract. Defaults to Model.

Value: IAgentModel

View source

public TimeSpan JudgmentTimeout { get; init; }

The default agent’s judgmentTimeout: the deadline of one assert, waitFor, or extract.

Value: TimeSpan

View source

public TimeSpan LaunchTimeout { get; init; }

How long the engine may take to start. Upstream launchTimeout.

Value: TimeSpan

View source

public int MaxModelCalls { get; init; }

The default agent’s model calls per agent call, 1 through 100.

Value: int

View source

public int MaxSteps { get; init; }

Actions one ActAsync may take, 1 through 100. MaxSteps can only lower it.

Value: int

View source

public IAgentModel? Model { get; init; }

The default agent’s model.

Value: IAgentModel

View source

public Action<TestException>? OnSoftFailure { get; init; }

Receives each expect.soft failure as it happens. Null keeps them on the session until CloseSoftFailures().

Value: Action<TestException>

View source

public string? ProjectRoot { get; init; }

Anchors the files a test names, such as a route’s fulfill Path. Defaults to the working directory.

Value: string

View source

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

The default agent’s provider options, keyed by provider. See ProviderOptions.

Value: IReadOnlyDictionary<string, JsonElement>

View source

public TimeSpan ReplayTimeout { get; init; }

How long a replay waits for each recorded target and for the recorded end state.

Value: TimeSpan

View source

public string? ResultsDirectory { get; init; }

Where a failed screenshot comparison puts its diff, actual, and expected images. Defaults to .e2e/results under the project root.

Value: string

View source

public TimeSpan StepTimeout { get; init; }

How long one ActAsync may run unless Timeout says otherwise. Judgments use JudgmentTimeout.

Value: TimeSpan

View source

public string? TargetName { get; init; }

The target’s name in a stored screenshot’s file name. Defaults to the engine’s platform.

Value: string

View source

public string? TestAgentContext { get; init; }

Upstream’s agentContext of a test or group: appended to the context of every agent, after its own.

Value: string

View source

public Func<bool>? TestFailed { get; init; }

Reports whether the test has already failed. Once it returns true, a passing check no longer verifies acts, so a teardown assertion after a failure does not record them.

Value: Func<bool>

View source

public string? TestFile { get; init; }

The full name of the test’s class, which stands for upstream’s test file: it joins the title in the result id and leads the name of the result’s directory, so two tests with one title in two classes keep apart. The NUnit and xUnit adapters set it, and e2e explore sets ExploreFile. It also makes the session a test, as upstream’s environment.test does: every prompt then opens with Test: <TestTitle>. Null keeps the title alone as the identity and adds no title line, as for an e2e mcp session, which runs no test.

Value: string

View source

public TimeSpan TestTimeout { get; init; }

Value: TimeSpan

View source

public required string TestTitle { get; init; }

Value: string

View source

public ResolvedRecording Trace { get; init; }

Which attempts record a trace. The session only carries the setting; Attempt says which attempt this is.

Value: ResolvedRecording

View source

public bool UpdateSnapshots { get; init; }

E2E_UPDATE_SNAPSHOTS=1: ToHaveScreenshotAsync writes each stored screenshot it finds missing or different, and passes.

Value: bool

View source

public ResolvedRecording Video { get; init; }

Which attempts record a video. The session only carries the setting; Attempt says which attempt this is.

Value: ResolvedRecording

View source