E2EConfig
Namespace: E2E
public sealed class E2EConfigThe 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
Fields
Section titled “Fields”FileName
Section titled “FileName”public const string FileName = "e2e.config.json"The file name String%5b%5d) looks for.
Value: string
Properties
Section titled “Properties”ActionTimeout
Section titled “ActionTimeout”public TimeSpan ActionTimeout { get; }Value: TimeSpan
public AgentConfig Agent { get; }The default agent. It always exists; its model may be null.
Value: AgentConfig
Agents
Section titled “Agents”public IReadOnlyDictionary<string, AgentConfig> Agents { get; }Value: IReadOnlyDictionary<string, AgentConfig>
AssertionTimeout
Section titled “AssertionTimeout”public TimeSpan AssertionTimeout { get; }Value: TimeSpan
public CacheConfig Cache { get; }Value: CacheConfig
public bool Ci { get; }True when the CI environment variable is set to a true value.
Value: bool
CleanupTimeout
Section titled “CleanupTimeout”public TimeSpan CleanupTimeout { get; }Engine shutdown timeout. Upstream cleanupTimeout, 30 s by default.
Value: TimeSpan
ConfigPath
Section titled “ConfigPath”public string? ConfigPath { get; }The file this config was read from, or null for the defaults.
Value: string
LaunchTimeout
Section titled “LaunchTimeout”public TimeSpan LaunchTimeout { get; }Engine start timeout. Upstream launchTimeout, 60 s by default.
Value: TimeSpan
ProjectRoot
Section titled “ProjectRoot”public string ProjectRoot { get; }The config file’s directory. Relative paths such as cache.dir resolve against it.
Value: string
Retries
Section titled “Retries”public int Retries { get; }0 to 10. Defaults to 1 in CI and 0 elsewhere. NUnit retries still come from [Retry].
Value: int
Secrets
Section titled “Secrets”public Secrets Secrets { get; }Value: Secrets
Target
Section titled “Target”public TargetConfig Target { get; }The target a test runs on. The port runs one target.
Value: TargetConfig
Targets
Section titled “Targets”public IReadOnlyList<TargetConfig> Targets { get; }Value: IReadOnlyList<TargetConfig>
Timeout
Section titled “Timeout”public TimeSpan Timeout { get; }Whole-test timeout. Upstream timeout, 120 s by default.
Value: TimeSpan
Methods
Section titled “Methods”Default(string, Func<string, string?>?)
Section titled “Default(string, Func<string, string?>?)”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
Discover(Func<string, string?>?)
Section titled “Discover(Func<string, string?>?)”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
Find(params string[])
Section titled “Find(params string[])”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
IsCi(Func<string, string?>?)
Section titled “IsCi(Func<string, string?>?)”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
Load(string, Func<string, string?>?)
Section titled “Load(string, Func<string, string?>?)”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
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