Skip to main content

Vocabulary

The docs use a small, deliberate vocabulary. This page is the whole of it, one table per idea. The name in prose is the name the trace records. Setup, report and viewer use the same term.

state.json (l1-first-journey)3 notes
1{
2"id": "client:System.Net.Http.HttpClient:Northstar",
3"client.name": "Northstar",
4"client.owned": true,
5"client.initializer": "AspNetCoreClientInitializer`1",
6"resource.state": "released"
7}
8{
9"id": "Northstar.ProtoTest.NorthstarMemberContext",
10"context.type": "Northstar.ProtoTest.NorthstarMemberContext",
11"context.value": { "Id": "owner", "Token": "[REDACTED]" }
12}
13{
14"kind": "http.request",
15"name": "REST · POST /api/v1/projects",
16"entity": "client:System.Net.Http.HttpClient:Northstar",
17"http.response.status_code": 201
18}
  1. A client entity

    The in-process client the test used. Owned by the test, created by the ASP.NET Core initializer, released at teardown.

  2. A context entity

    Typed state the member attribute set. Secrets are redacted in the archive, so the token reads [REDACTED].

  3. The operation that points at it

    The POST names the client entity by id and carries what it returned: status 201.

Two entities and the operation that points at them, from docs/static/lessons/l1-first-journey.prototrace.

The first hour​

TermWhat it means
HostOne ProtoHost per test process, built once by your runner's assembly setup. It owns the dependency injection container, the run hooks, the run gates, the infrastructure and the start and completion of every test.
Execution contextOne ProtoExecutionContext per test, reached anywhere on the test's flow as Proto.Context. It holds that test's clients, typed state, resources, findings, attachments and observations, and its own DI scope.
AddressWhere a target is reached. An application derives its key, ProtoTest:Applications:{name}:BaseUrl; infrastructure and integrations declare their own, such as ConnectionStrings:* or the broker's connection key.

Foundation introduces​

TermWhat it means
Configured providerthe chain provider that holds when the environment already configures the target's keys (UseConfigured()). The environment serves the target, so the run starts nothing for it.
CapabilityA named thing the host can actually serve, described by a ProtoCapabilityDescriptor with a kind, a name and, when it covers one instance, that instance. An integration declares one only while it is composed and can serve it, so skip conditions can gate tests on it.
Provider chainThe ordered providers registered for one target. The first whose condition holds serves it, and every other provider is recorded skipped with its reason. A target with no satisfied provider fails the build. See Environment resolution.
Trace entityOne thing whose state the run recorded: a client, the context, the test user, the server, a capability, a clock, a device. Operations point at entities by id, so an entry names what it acted on.

Lifecycle phases​

Every trace entry belongs to one phase:

PhaseWhat runs
Setupthe test hooks, then the attributes, before the body
Executionthe test body
Teardownattributes and hooks in reverse, attachments publish, resources release
Rollbackteardown after a failed setup, in place of Teardown
Runrun-level work: run hooks, gates and infrastructure

The order, the failure rules and the rollback walk are in Host and lifecycle.

Trace entity kinds​

Entities are state, not history: each appears once in the archive with its latest state and its versions. Example ids come from the lesson archives (l1-first-journey, l3-clock-window).

KindIdExample idWhat it records
clientclient:{fullTypeName}:{name}client:System.Net.Http.HttpClient:Northstara client a test resolved
context{fullTypeName}, or {key}:{fullTypeName} when set with a keyNorthstar.ProtoTest.NorthstarMemberContexttyped state an attribute or hook set
authauth:userauth:userthe test user and how it signed in
serverserver:{entryPointFullName}:{application}server:ProtoTest.SampleApp.Program:Northstarthe in-process application server
capability{kind}:{name}, with :{instance} when the descriptor carries oneserver:ASP.NET Core:Northstarwhat the run can serve
clockclock:run for the run, and a clock per testclock:725654000001the clocks a test can advance
devicedevice:{client}:{deviceType}:{id}a pattern; no lesson archive records onea device session

Tracked values are state items with kind value and an id of the form {type}:{identity}. Infrastructure and resources use their own ids. The entry kinds themselves, from test.setup to the last assertion, are listed in ProtoTrace.

Observations, findings and attachments​

Three different things, three different destinations:

ObservationFindingAttachment
What it isa fact a test learnedsomething worth reporting that is not a failurea file a test produced
Who records itintegrations; you with RecordObservationyou with AddFinding; a teardown failure becomes oneintegrations; you with AddAttachment
Where it goescollectors, then reports, and the tracereports and run gates, and the tracethe runner, and the archive
What it does not dofail a test or a gatereplace the test's outcomecount as coverage

Coverage is built from observations, which is why this distinction matters: a fact a test did not state is not coverage. See Coverage and observations and Attachments.