Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs-site/public/api/E2E.Engine.IEngine-1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="canonical" href="https://www.hardkoded.com/e2e-dotnet/api/E2E.Engine/IEngine-1/">
<meta http-equiv="refresh" content="0; url=/e2e-dotnet/api/E2E.Engine/IEngine-1/">
<title>Redirecting…</title>
<script>location.replace("/e2e-dotnet/api/E2E.Engine/IEngine-1/" + (location.hash || ""));</script>
</head>
<body>
<p><a href="/e2e-dotnet/api/E2E.Engine/IEngine-1/">Continue</a></p>
</body>
</html>
13 changes: 13 additions & 0 deletions docs-site/public/api/E2E.Host-1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="canonical" href="https://www.hardkoded.com/e2e-dotnet/api/E2E/Host-1/">
<meta http-equiv="refresh" content="0; url=/e2e-dotnet/api/E2E/Host-1/">
<title>Redirecting…</title>
<script>location.replace("/e2e-dotnet/api/E2E/Host-1/" + (location.hash || ""));</script>
</head>
<body>
<p><a href="/e2e-dotnet/api/E2E/Host-1/">Continue</a></p>
</body>
</html>
13 changes: 13 additions & 0 deletions docs-site/public/api/E2E.Session-1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="canonical" href="https://www.hardkoded.com/e2e-dotnet/api/E2E/Session-1/">
<meta http-equiv="refresh" content="0; url=/e2e-dotnet/api/E2E/Session-1/">
<title>Redirecting…</title>
<script>location.replace("/e2e-dotnet/api/E2E/Session-1/" + (location.hash || ""));</script>
</head>
<body>
<p><a href="/e2e-dotnet/api/E2E/Session-1/">Continue</a></p>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ public bool Headed { get; init; }
```


Whether the run asked for a visible surface (`--headed`). .NET-only place: upstream hands it to `init` ([Headed](/api/E2E.Engine/EngineInitInfo/#E2E_Engine_EngineInitInfo_Headed)), which the port does not call per worker, so a session start carries it.
Whether the run asked for a visible surface (`--headed`). .NET-only place: upstream hands it to `init` ([Headed](/api/E2E.Engine/EngineInitInfo/#E2E_Engine_EngineInitInfo_Headed)),
which the port does not call per worker, so a session start carries it.

**Value:** [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Expand Down
4 changes: 2 additions & 2 deletions docs-site/src/content/docs/api/E2E.Engine/IBrowserProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ Task<IReadOnlyList<string>> SweepAsync(BrowserReleaseContext context, Cancellati
Releases every lease of the run and target the provider still holds open, and resolves to their ids. Called once
per target from finish, in the runner, after every worker exited and the leases prepare made were released:
whatever it finds is a lease a worker acquired (a per-attempt browser, a replacement) and never gave back,
because the worker died before it could. Find them by what acquire tagged them with at the service: the run id
and the target.
because the worker died before it could. Find them by service tags or a shared journal scoped to the run id and
target.

**Parameters**

Expand Down
54 changes: 54 additions & 0 deletions docs-site/src/content/docs/api/E2E.Engine/IEngine-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: "IEngine<TFixtures>"
description: "An engine that contributes fixtures to the sessions opened on it, which LaunchAsync<T> types a host and its sessions by. Upstream's EngineHandle<Fixtures> (d..."
editUrl: false
prev: false
next: false
sidebar:
label: "IEngine<TFixtures>"
hidden: true
---

<a id="E2E_Engine_IEngine_1"></a>

Namespace: [E2E.Engine](/api/E2E.Engine/)


```csharp
public interface IEngine<out TFixtures> : IEngine where TFixtures : class
```


An engine that contributes fixtures to the sessions opened on it, which `LaunchAsync&lt;T&gt;` types a host and its sessions by.
Upstream's `EngineHandle<Fixtures>` (`defineEngine<Fixtures>`).

**Type parameters**

| Name | Description |
| --- | --- |
| `TFixtures` | What a session on this engine holds beside `Screen` and `App`, such as `Device` on a mobile engine. |

[View source](https://github.com/hardkoded/e2e-dotnet/blob/main/src/E2E/Engine/IEngine.cs)

## Methods

<a id="E2E_Engine_IEngine_1_CreateFixtures_"></a>
<a id="E2E_Engine_IEngine_1_CreateFixtures_E2E_Engine_IEngineSession_"></a>

### CreateFixtures(IEngineSession)


```csharp
TFixtures CreateFixtures(IEngineSession session)
```


The fixtures of one session, over the engine's own &lt;code class="paramref"&gt;session&lt;/code&gt;.

**Parameters**

| Name | Type | Description |
| --- | --- | --- |
| `session` | [IEngineSession](/api/E2E.Engine/IEngineSession/) | |

**Returns:** `TFixtures`
1 change: 1 addition & 0 deletions docs-site/src/content/docs/api/E2E.Engine/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ Public types in the `E2E.Engine` namespace.
| [IDisposableEngine](/api/E2E.Engine/IDisposableEngine/) | An engine with upstream's optional dispose hook (declared in engine/index.ts): worker shutdown within the cleanup budget, where the engine releases what its workers hold, or keeps the run-owned part of it when ReuseSignal is live. .NET-only name: upstream's engine has the member in the same contract as prepare and finish. |
| [IDoctorEngine](/api/E2E.Engine/IDoctorEngine/) | An engine with upstream's optional doctor hook (declared in engine/index.ts): what e2e doctor asks once per target, instead of starting a run. Without it the target gets one engine check with status skip. .NET-only name: upstream's Engine declares the member, and the port keeps its optional hooks in their own interfaces (IPreparableEngine), so an engine without the hook compiles unchanged. |
| [IEngine](/api/E2E.Engine/IEngine/) | The body of one target. Core knows this contract and never an engine's internals. Version is the engine version. It is not part of the replay cache key: a recording re-finds its nodes at replay. |
| [IEngine&lt;TFixtures&gt;](/api/E2E.Engine/IEngine-1/) | An engine that contributes fixtures to the sessions opened on it, which LaunchAsync&lt;T&gt; types a host and its sessions by. Upstream's EngineHandle<Fixtures> (defineEngine<Fixtures>). |
| [IEngineFixtureHost](/api/E2E.Engine/IEngineFixtureHost/) | An engine session that contributes a fixture, which the harness tells about the attempt when it starts. .NET-only: upstream's engine declares fixtures, factories the harness calls with an EngineFixtureContext; the port's session builds its own fixture (Device), so this hands it the context. |
| [IEngineSession](/api/E2E.Engine/IEngineSession/) | One attempt's session with the app. Disposed at the end of the attempt, after afterEach. |
| [IPreparableEngine](/api/E2E.Engine/IPreparableEngine/) | An engine with upstream's optional prepare and finish hooks (declared in engine/index.ts): what a run provisions once per target before any worker starts, such as a hosted device, and gives back after the last worker ended, so the provisioning happens once per run instead of per worker. The run's own path calls them: Runner.RunAsync and the run fixtures of E2E.NUnit and E2E.XUnit.V3 prepare each engine once and finish it when the run ends, and a host that starts the engine on its own, as e2e explore and e2e mcp do, calls them around the one attempt (upstream's openStandaloneAttempt), prepare when the session opens and finish when it closes, on every path. .NET-only name: upstream tests the engine handle for the members. WebEngine does not implement it, because it leases for the attempt it starts. |
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/api/E2E/E2ESessionOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ public string? LinkBase { get; init; }
```


The target's `app.linkBase`, which `App.OpenAsync(path)` joins a path to on a device. It applies only to a pinned app with no [BaseUrl](/api/E2E/E2ESessionOptions/#E2E_E2ESessionOptions_BaseUrl); with a base URL a path resolves against that URL.
The target's `app.linkBase`, which `App.OpenAsync(path)` joins a path to on a device. It applies only to a pinned app with no [BaseUrl](#E2E_E2ESessionOptions_BaseUrl); with a base URL a path resolves against that URL.

**Value:** [string](https://learn.microsoft.com/dotnet/api/system.string)

Expand Down
126 changes: 126 additions & 0 deletions docs-site/src/content/docs/api/E2E/Host-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
---
title: "Host<TFixtures>"
description: "A host on an engine that contributes fixtures: its sessions are Session<T>. Upstream's Host<Fixtures> (core/launch.ts)."
editUrl: false
prev: false
next: false
sidebar:
label: "Host<TFixtures>"
hidden: true
---

<a id="E2E_Host_1"></a>

Namespace: [E2E](/api/E2E/)


```csharp
public sealed class Host<TFixtures> : IAsyncDisposable where TFixtures : class
```


A host on an engine that contributes fixtures: its sessions are `Session&lt;T&gt;`. Upstream's `Host<Fixtures>` (`core/launch.ts`).

**Type parameters**

| Name | Description |
| --- | --- |
| `TFixtures` | What the engine contributes, as `IEngine&lt;T&gt;` declares. |

**Inheritance:** [object](https://learn.microsoft.com/dotnet/api/system.object)

**Implements:** [IAsyncDisposable](https://learn.microsoft.com/dotnet/api/system.iasyncdisposable)

[View source](https://github.com/hardkoded/e2e-dotnet/blob/main/src/E2E/Core/Launch.cs)

## Properties

<a id="E2E_Host_1_Platform_"></a>
<a id="E2E_Host_1_Platform"></a>

### Platform


```csharp
public string Platform { get; }
```


The engine's platform label: `web`, `ios`, `android`, or an engine's own string.

**Value:** [string](https://learn.microsoft.com/dotnet/api/system.string)

## Methods

<a id="E2E_Host_1_CloseAsync_"></a>
<a id="E2E_Host_1_CloseAsync"></a>

### CloseAsync()


```csharp
public Task CloseAsync()
```


Closes the open session, then the engine. Idempotent. Throws an [AggregateException](https://learn.microsoft.com/dotnet/api/system.aggregateexception) of the failures closing found. Upstream's `close`.

**Returns:** [Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

<a id="E2E_Host_1_DisposeAsync_"></a>
<a id="E2E_Host_1_DisposeAsync"></a>

### DisposeAsync()


```csharp
public ValueTask DisposeAsync()
```


Closes the open session, then the engine. Idempotent. Throws an [AggregateException](https://learn.microsoft.com/dotnet/api/system.aggregateexception) of the failures closing found. Upstream's `close`.

**Returns:** [ValueTask](https://learn.microsoft.com/dotnet/api/system.threading.tasks.valuetask)

<a id="E2E_Host_1_NewSessionAsync_"></a>
<a id="E2E_Host_1_NewSessionAsync_E2E_NewSessionOptions_System_Threading_CancellationToken_"></a>

### NewSessionAsync(NewSessionOptions?, CancellationToken)


```csharp
public Task<Session<TFixtures>> NewSessionAsync(NewSessionOptions? options = null, CancellationToken cancellationToken = default)
```


Opens a session. One at a time: the previous one must be closed.

**Parameters**

| Name | Type | Description |
| --- | --- | --- |
| `options` | [NewSessionOptions](/api/E2E/NewSessionOptions/) | |
| `cancellationToken` | [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) | |

**Returns:** [Task&lt;Session&lt;TFixtures&gt;&gt;](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)

<a id="E2E_Host_1_Secret_"></a>
<a id="E2E_Host_1_Secret_System_String_"></a>

### Secret(string)


```csharp
public Secret Secret(string name)
```


The handle of a secret passed to `LaunchAsync`, for `FillAsync` or an agent's params. An unknown name throws `SECRET_UNAVAILABLE`.

**Parameters**

| Name | Type | Description |
| --- | --- | --- |
| `name` | [string](https://learn.microsoft.com/dotnet/api/system.string) | |

**Returns:** [Secret](/api/E2E/Secret/)
29 changes: 29 additions & 0 deletions docs-site/src/content/docs/api/E2E/Launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,32 @@ opens sessions on it. Each launch needs its own engine instance.
| `cancellationToken` | [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) | |

**Returns:** [Task&lt;Host&gt;](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)

<a id="E2E_Launch_LaunchAsync__1_E2E_Engine_IEngine___0__E2E_LaunchOptions_System_Threading_CancellationToken_"></a>

### `LaunchAsync<TFixtures>(IEngine<TFixtures>, LaunchOptions?, CancellationToken)`


```csharp
public static Task<Host<TFixtures>> LaunchAsync<TFixtures>(IEngine<TFixtures> engine, LaunchOptions? options = null, CancellationToken cancellationToken = default) where TFixtures : class
```


Launches an engine that contributes fixtures (`IEngine&lt;T&gt;`), so each session of the host holds them as `Fixtures`.
Upstream's `launch<Fixtures>`.

**Type parameters**

| Name | Description |
| --- | --- |
| `TFixtures` | |

**Parameters**

| Name | Type | Description |
| --- | --- | --- |
| `engine` | `IEngine&lt;TFixtures&gt;` | |
| `options` | [LaunchOptions](/api/E2E/LaunchOptions/) | |
| `cancellationToken` | [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) | |

**Returns:** [Task&lt;Host&lt;TFixtures&gt;&gt;](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)
5 changes: 3 additions & 2 deletions docs-site/src/content/docs/api/E2E/LaunchOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ public TimeSpan? Timeout { get; init; }
```


Default timeout of one operation: an action, a wait, a read. Without it an action gets 30 seconds. An agent step has its own, `ActAsync`'s
timeout. There is no session deadline.
Default timeout of one operation: an action, a wait, a read, and `App.OpenAsync` or `App.RestartAsync`. Without it an action, a wait,
or a read gets 30 seconds, and an app open or restart 120 seconds. A session changes it with [SetDefaultTimeout(TimeSpan)](/api/E2E/Session/#E2E_Session_SetDefaultTimeout_System_TimeSpan_). An agent
step has its own, `ActAsync`'s timeout. There is no session deadline.

**Value:** [TimeSpan?](https://learn.microsoft.com/dotnet/api/system.timespan)
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/api/E2E/ScriptedModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ and the judge may answer a judgment (a request with a [Schema](/api/E2E/ModelReq

**Implements:** [IAgentModel](/api/E2E/IAgentModel/)

[View source](https://github.com/hardkoded/e2e-dotnet/blob/main/src/E2E/Agent/Model.cs)
[View source](https://github.com/hardkoded/e2e-dotnet/blob/main/src/E2E/obj/Release/net10.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs)

## Constructors

Expand Down
53 changes: 53 additions & 0 deletions docs-site/src/content/docs/api/E2E/Session-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: "Session<TFixtures>"
description: "A session on an engine that contributes fixtures of its own: Fixtures holds them, such as Device on a mobile engine. Upstream's Session<Fixtures> (core/launc..."
editUrl: false
prev: false
next: false
sidebar:
label: "Session<TFixtures>"
hidden: true
---

<a id="E2E_Session_1"></a>

Namespace: [E2E](/api/E2E/)


```csharp
public sealed class Session<TFixtures> : Session, IAsyncDisposable where TFixtures : class
```


A session on an engine that contributes fixtures of its own: `Fixtures` holds them, such as `Device` on a mobile engine. Upstream's
`Session<Fixtures>` (`core/launch.ts`), the session type intersected with the engine's fixtures; C# has no intersection, so the
engine's fixtures are one member.

**Type parameters**

| Name | Description |
| --- | --- |
| `TFixtures` | What the engine contributes, as `IEngine&lt;T&gt;` declares. |

**Inheritance:** [object](https://learn.microsoft.com/dotnet/api/system.object) → [Session](/api/E2E/Session/)

**Implements:** [IAsyncDisposable](https://learn.microsoft.com/dotnet/api/system.iasyncdisposable)

[View source](https://github.com/hardkoded/e2e-dotnet/blob/main/src/E2E/Core/Launch.cs)

## Properties

<a id="E2E_Session_1_Fixtures_"></a>
<a id="E2E_Session_1_Fixtures"></a>

### Fixtures


```csharp
public TFixtures Fixtures { get; }
```


What the engine contributes beside [Screen](/api/E2E/Session/#E2E_Session_Screen), [App](/api/E2E/Session/#E2E_Session_App), and [Platform](/api/E2E/Session/#E2E_Session_Platform).

**Value:** `TFixtures`
Loading
Loading