E2ETest
Namespace: E2E.XUnit.V3
public abstract class E2ETest : E2EFixture, IAsyncLifetime, IAsyncDisposableBase class for an xUnit v3 test that drives the app. InitializeAsync() starts one
engine session. DisposeAsync() commits the replay cache from the xUnit result: a
pass or a skip records verified acts, a failure evicts the unverified ones it recorded or
replayed, and a cancelled test leaves the cache alone. xUnit has no retry, so every test is a
first attempt and can replay. A check in a derived DisposeAsync after a failure verifies nothing.
Each Expect.Soft failure is kept on the session. The test body runs on, and the test
fails when it is disposed, with every soft failure in one message.
Settings come from E2EFixture.
Inheritance: object → E2EFixture
Implements: IAsyncLifetime, IAsyncDisposable
Methods
Section titled “Methods”CacheTitle(ITest)
Section titled “CacheTitle(ITest)”protected virtual string CacheTitle(ITest test)The test’s title: its cache identity, and the Test: line every prompt’s context opens with.
The default is the class and method name, with every theory
argument in full, so each test and theory row keeps its own replay. The xUnit display name
is not used, because xUnit shortens long arguments in it and a display setting can change it.
Parameters
| Name | Type | Description |
|---|---|---|
test |
ITest |
Returns: string
DisposeAsync()
Section titled “DisposeAsync()”public virtual ValueTask DisposeAsync()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
Returns: ValueTask — A task that represents the asynchronous dispose operation.
InitializeAsync()
Section titled “InitializeAsync()”public virtual ValueTask InitializeAsync()Called immediately after the class has been created, before it is used.
Returns: ValueTask