Namespace ProtoTest.Core

Classes

ApplicationAttribute

Selects the application under test for a test or class and, optionally, which registered client each protocol uses. Bindings use Protocol:Client (for example Rest:Billing or Web:Admin); unlisted protocols use the application's first registered client of that protocol.

Proto

Provides a static gateway to the active ProtoExecutionContext.

ProtoApplication

Resolves the named application — a system under test with a base address and protocol descriptors — that a client or web session targets, and reads values from its ProtoTest:Applications:{app} section. A scope selects an application with its own Application setting, defaulting to the scope's own name, so a REST client, GraphQL client, and browser session can share one application.

ProtoApplicationClient

A client of a protocol registered under an application.

ProtoApplicationClients

The ordered clients registered for one application, per protocol.

ProtoApplicationHostBuilderExtensions
ProtoApplicationRegistry

Resolves the clients registered for each application. Integrations use it to pick a protocol's default client — the first registered — when a test does not name one explicitly.

ProtoApplicationResolution

Resolves which client a protocol accessor should use for the current application.

ProtoApplicationState

The application selected for the current test and any per-protocol client bindings.

ProtoApplicationTransport

The in-process transport (an ASP.NET Core server client) backing an application. An application's HTTP clients with no configured base address reuse this transport instead of opening a socket.

ProtoAssertion

Runner-independent semantics shared by integrations whose assertions run in a positive or a negated form. A negated assertion is satisfied when the underlying check does not hold, and its expectation reads with a leading "not".

ProtoAssertionException

Base type for runner-independent assertion failures produced by ProtoTest integrations.

ProtoAttribute

Base attribute for defining test-level or class-level lifecycle execution hooks.

ProtoAttributeResolver

Resolves the ProtoTest lifecycle attributes that apply to a test method.

ProtoAuthenticatorFactory

Constructs a protocol authenticator so its constructor can request ProtoExecutionContext directly, in addition to any services resolvable from DI and explicit constructor arguments.

ProtoCapabilityDescriptor

Describes one thing the host is composed of: a capability or an adapter behind it. Descriptors are metadata, not lifecycle - they record what an application is made of for the run overview, the trace and the report. Register one with AddCapability(IProtoHostBuilder, ProtoCapabilityDescriptor).

ProtoCapabilityExtensions

Registers capability descriptors from the host builder or from an application builder.

ProtoCapabilityKinds

The capability kinds ProtoTest itself registers; an integration may use its own.

ProtoConfigurableOptionsExtensions
ProtoCoverageCollector

Thread-safe base for collectors that aggregate observations as coverage items.

ProtoCoverageSummary

Aggregated coverage for one target and category, as seen by a Run gate.

ProtoDocumentSource

Loads a text document from inline content, a local file, or an HTTP(S) URL.

ProtoExecutionContext

Provides the public per-test façade for metadata, services, state, clients, attachments, and observations.

ProtoHost

Owns the ProtoTest service provider and exposes the public run and test lifecycle API. Lifecycle execution is delegated to focused internal components.

ProtoHostBuilder

Implements the builder pattern for configuring and constructing a ProtoHost instance.

ProtoHostBuilderSinkExtensions
ProtoInfrastructureExtensions
ProtoInfrastructureRegistration

Registered infrastructure with the configuration keys it provides, for example ConnectionStrings:Northstar for the application and ProtoTest:... for the adapter. The host exposes started values through ProtoInfrastructureSettings, and the in-process application receives them as host settings automatically.

ProtoInfrastructureSettings

The configuration values started infrastructure provided, keyed as the application reads them.

ProtoObservation

A protocol-agnostic fact observed during a test execution.

ProtoReportItem

A normalized item that can be rendered by any report sink. Kind is an open string so integrations can define their own; ProtoReportItemKinds names the values Core itself uses.

ProtoReportItemExtensions

Traversal and coverage arithmetic shared by every consumer of ProtoReportItem trees - the report summary, the HTML renderer and Run gate coverage - so the three cannot disagree.

ProtoReportItemKinds

The report item kinds Core produces. A kind is an open string, so an integration can add its own; sinks group unknown kinds under their own section instead of dropping them.

ProtoResource

A resource described by a release callback, for cases that do not warrant a type of their own.

ProtoResourceReleaseContext

Provides everything a resource needs while it is being released.

ProtoResourceSnapshot

An immutable view of one resource owned by a test.

ProtoRunGate

A Run gate defined by a delegate.

ProtoRunGateContext

The evidence a Run gate evaluates: everything the run's collectors and report sources produced, whatever kind. Coverage, findings, metrics and observations all arrive as ProtoReportItem.

ProtoRunGateCoverageExtensions

Coverage helpers for Run gates. Coverage is one kind of collected evidence among several, so its arithmetic lives here rather than on ProtoRunGateContext.

ProtoRunGateException

Thrown when one or more Run gates failed, failing the run.

ProtoRunGateFailure

One failed Run gate, as reported when the run ends.

ProtoRunGateResult

The verdict of one Run gate.

ProtoTestAttachment

A file or in-memory artifact associated with one test execution.

ProtoTestDiagnostics

Diagnostic source information used by OpenTelemetry and other Activity listeners.

ProtoTestHostLifetime

Owns the single root ProtoHost for a test assembly and enforces one-time initialization. Shared by every test-framework adapter so host lifetime, guards, and shutdown ordering stay identical across frameworks.

ProtoTestIdOptions
ProtoTestName

Builds the stable, fully qualified test name recorded for a test method, shared by the adapters so traces and reports use the same naming across frameworks.

ProtoTestResult

The final result reported by a test-framework adapter.

ProtoTestSkip

Evaluates the skip conditions of a resolved attribute set.

ProtoTestTrace
ProtoTraceArtifact
ProtoTraceAttachmentRecord

An artifact the test attached; the file itself lives in the bundle's artifacts.

ProtoTraceContent

Caps long payloads before they become trace sections, so a trace stays a trace and not a dump. JSON is pretty-printed before it is capped; anything else is capped as written.

ProtoTraceEntity

The current state of one thing the run composed: a client, context, resource, server or capability. Entities are state, not history: an entity appears once in the artifact with its latest state and its versions, and entries refer to it by EntityId.

ProtoTraceEntityKinds

The entity kinds ProtoTest itself records; an integration may define its own.

ProtoTraceEntry
ProtoTraceError
ProtoTraceFindingRecord

Evidence worth reporting that is deliberately not a failure.

ProtoTraceItemKeys

Builds the identity segments ProtoTrace uses for tracked values. A tracked value is the item kind value with the id {type}:{identity}, where {type} is the CLR type name in snake_case: an InvoiceLine becomes invoice_line:42. An application that emits its own identity attribute (invoice_line.number) uses the same segment, so both sides describe one value.

ProtoTraceObservationRecord

A semantic fact the test emitted on purpose.

ProtoTraceOperation

A timed operation in a ProtoTest execution trace.

ProtoTraceOptions
ProtoTraceRecord

Deliberate evidence: what the test observed, attached, found and proved. The record axis is separate from the timeline and the world; items reference the operation (and often the value) they belong to, and never duplicate what those axes already carry.

ProtoTraceRun
ProtoTraceSection

A labelled block inside an operation. Integrations attach sections where the data is known; the viewer renders them under the operation, and the inspector reads the same sections deeper.

ProtoTraceSectionItem

One item of a fields, checks or diff section. Fields use Value; checks use Value and Detail with a Tone; diff uses Label as the property path with expected in Value and actual in Detail.

ProtoTraceValue

A domain object the run touched - a tenant, project, invoice, message. Values are the data side of the trace: identity plus versions, so a reader can follow how a value changed, not just that it appeared.

ProtoTraceValueFormatter

Serializes a value into compact, cycle-safe, redacted JSON for trace attributes. Shared so every integration renders diagnostic values the same way.

ProtoTraceVersion

One state of a world item, and what produced it. Shared by values and entities.

ProtoTraceVisibility

What a run could see, recorded so a gap is explained rather than implied: visibility is integration depth, not hosting mode.

ProtoTraceWriterExtensions

Reduces the start/await/succeed-or-fail boilerplate repeated across ProtoTest integrations.

ProtoUriSanitizer

Text-level redaction for the addresses integrations trace: URI user-info (credentials) is removed unconditionally, and the values of well-known sensitive query parameters are replaced. Shared by HTTP, gRPC, messaging and web so one policy cannot drift between packages.

RequiresCapabilityAttribute

Skips the test unless the host is composed with a capability of the given kind - for example a test-side domain that only exists when the suite owns the store. The kind is open, like capability kinds themselves; ProtoCapabilityKinds lists the built-in ones.

RequiresInProcessAttribute

Skips the test unless the application runs in-process: in-process services, transactional isolation and a test-side composition of the application's own code only exist in that hosting mode.

Structs

ProtoCoverageTotals

Coverage units counted across a set of report items: covered, uncovered and the rounded percentage.

ProtoTestId

Numeric identifier for one test execution. Its string representation preserves the configured width.

ProtoTraceScope

A lightweight fluent descriptor for a traced operation. Create one with Operation(IProtoTraceWriter, string, string, string), refine it with During(ProtoTracePhase), Parent(string?) and With(string, string?), then either run traced work through RunAsync(Func<ValueTask>) or open a handle with Begin().

Interfaces

IProtoApplicationBuilder

Configures one named application under test. Integrations extend it — for example app.AddRest(rest => rest.AddClient("Orders")) — to expose the protocols and clients the application supports. The first client registered for a protocol becomes that protocol's default.

IProtoBinaryContent

A named binary payload a test produced - a downloaded report, an exported document. Integrations that consume files accept this instead of a response type, so REST, GraphQL or an attachment can feed them without any of them knowing about each other.

IProtoClientInitializer

Defines a contract for initializing and registering client instances (e.g., HttpClient, GrpcChannel) into the active ProtoExecutionContext.

IProtoClientInitializer<TClient>

Defines a client initializer for a specific client type.

IProtoCollector

Consumes observations during test execution. Reporting is optional and exposed separately through IProtoReportSource.

IProtoConfigurableOptions

An options (or sink) type whose properties can be layered with values from a fixed "ProtoTest:..." configuration section after code-based defaults are applied.

IProtoConnectionInfrastructure

Infrastructure that hands the application under test a connection string.

IProtoContext

Marker interface for custom contextual data stored in a ProtoExecutionContext.

IProtoHostBuilder

Defines the builder contract for constructing and configuring a ProtoHost.

IProtoInfrastructure

Something the run provides for itself - a database, a broker, a storage emulator. The host starts every registered piece before the run hooks, records it as a run entity, and releases it with the run, so a test suite declares what it needs instead of starting things by hand.

IProtoReportSource

Produces a snapshot of normalized items for end-of-run reporting.

IProtoResource

Something the current test owns. Resources are released in reverse registration order during teardown, after test hooks and attributes have run but before the test's clients are disposed.

IProtoRunGate

Evaluates the evidence a run collected and can fail the run. Gates run once the suite has finished, before reports are written, so a failed gate still produces its report.

IProtoRunHook

Defines lifecycle hooks that run once per test suite execution (before all tests start and after all tests finish).

IProtoSettingsInfrastructure

Infrastructure that fills configuration keys with values only it can know after starting, for example the address of a standalone application a browser should visit.

IProtoSink

Defines a contract for exporting normalized report data.

IProtoSinkArtifactSource

Exposes files produced by a sink so tracing can bundle them as run-level artifacts.

IProtoSkipCondition

A condition that can stop a test before its lifecycle starts, with a reason the runner can report. Adapters evaluate these before starting the test; a runner that does not evaluate them simply runs the test, so the contract stays opt-in.

IProtoTargetBuilder

Configures observation collection for a named target.

IProtoTestAttachmentPublisher

Publishes Core attachments to a test framework or another artifact destination.

IProtoTestHook

Defines a lifecycle hook executed before and after each test.

IProtoTestIdGenerator
IProtoTraceSource

Provides immutable snapshots of the automatic ProtoTest execution trace.

IProtoTraceWriter

Records automatic execution operations and events. This API primarily exists for ProtoTest integrations.

Enums

ProtoReportStatus
ProtoResourceScope

How long an owned resource lives.

ProtoResourceState

Describes what happened to an owned resource.

ProtoRunGateOutcome

How a Run gate evaluated.

ProtoTraceEntryKind
ProtoTraceOutcome
ProtoTracePhase
ProtoTraceSectionKind

The closed vocabulary of operation sections. A viewer renders these four kinds and nothing else, so an integration describes what happened in data, never in markup or styling.

ProtoTraceSectionTone
ProtoTraceValueSource

Where a value version came from, so a reader can tell "not visible" from "did not happen".