Skip to content

E2EConfig

Namespace: E2E

public sealed class E2EConfig

The resolved e2e.config.json. The JSON shape follows upstream e2e.config.ts: targets[].app.url, named agents, top-level timeouts in milliseconds, retries, cache, and secrets. Unknown keys fail with INVALID_CONFIG. E2ETest finds and applies this file; a fixture can still override each value. There is no default model.

Inheritance: object

View source

public const string FileName = "e2e.config.json"

The file name String%5b%5d) looks for.

Value: string

View source

public TimeSpan ActionTimeout { get; }

Value: TimeSpan

View source

public AgentConfig Agent { get; }

The default agent. It always exists; its model may be null.

Value: AgentConfig

View source

public IReadOnlyDictionary<string, AgentConfig> Agents { get; }

Value: IReadOnlyDictionary<string, AgentConfig>

View source

public TimeSpan AssertionTimeout { get; }

Value: TimeSpan

View source

public CacheConfig Cache { get; }

Value: CacheConfig

View source

public bool Ci { get; }

True when the CI environment variable is set to a true value.

Value: bool

View source

public TimeSpan CleanupTimeout { get; }

Engine shutdown timeout. Upstream cleanupTimeout, 30 s by default.

Value: TimeSpan

View source

public string? ConfigPath { get; }

The file this config was read from, or null for the defaults.

Value: string

View source

public TimeSpan LaunchTimeout { get; }

Engine start timeout. Upstream launchTimeout, 60 s by default.

Value: TimeSpan

View source

public string ProjectRoot { get; }

The config file’s directory. Relative paths such as cache.dir resolve against it.

Value: string

View source

public int Retries { get; }

0 to 10. Defaults to 1 in CI and 0 elsewhere. NUnit retries still come from [Retry].

Value: int

View source

public Secrets Secrets { get; }

Value: Secrets

View source

public TargetConfig Target { get; }

The target a test runs on. The port runs one target.

Value: TargetConfig

View source

public IReadOnlyList<TargetConfig> Targets { get; }

Value: IReadOnlyList<TargetConfig>

View source

public TimeSpan Timeout { get; }

Whole-test timeout. Upstream timeout, 120 s by default.

Value: TimeSpan

View source

public static E2EConfig Default(string projectRoot, Func<string, string?>? environment = null)

The config with no file: upstream defaults, a web target with no URL, and no model.

Parameters

Name Type Description
projectRoot string
environment Func<string, string>

Returns: E2EConfig

View source

public static E2EConfig Discover(Func<string, string?>? environment = null)

Loads the nearest FileName above the test assembly directory, then above the working directory. Without one, returns String%7d) for the working directory.

Parameters

Name Type Description
environment Func<string, string>

Returns: E2EConfig

View source

public static string? Find(params string[] startDirectories)

The nearest FileName in each start directory or one of its parents, tried in order, or null. A directory with a .git entry is the repository root: the search looks for the file there and goes no higher.

Parameters

Name Type Description
startDirectories string[]

Returns: string

View source

public static bool IsCi(Func<string, string?>? environment = null)

True when CI is set to anything but empty, 0, or false.

Parameters

Name Type Description
environment Func<string, string>

Returns: bool

View source

public static E2EConfig Load(string path, Func<string, string?>? environment = null)

Reads and validates a config file. Throws ConfigurationException with INVALID_CONFIG.

Parameters

Name Type Description
path string
environment Func<string, string>

Returns: E2EConfig

View source

Parse(string, string, Func<string, string?>?)

Section titled “Parse(string, string, Func<string, string?>?)”
public static E2EConfig Parse(string json, string projectRoot, Func<string, string?>? environment = null)

Validates config JSON. <code class=“paramref”>projectRoot</code> anchors relative paths.

Parameters

Name Type Description
json string
projectRoot string
environment Func<string, string>

Returns: E2EConfig

View source