ProtoTest is a foundation for integration testing on .NET 8, 9 and 10. One host per suite, one context per test, one trace per run.
Watch ProtoTest in 70 seconds: one real test, from the failure on CI to the proven fix.
dotnet new install ProtoTest.Templates
dotnet new prototest -n Shop
cd Shop
dotnet testThe template suite is green on a fresh checkout. It hosts the app in process and needs no containers or browsers.
[Application("Api")]
[ProtoTest]
[SignedInAs]
public async Task RestWritesAreVisibleThroughGraphQL()
{
using var created = await Proto.Context.Rest()
.Body(new CreateProjectRequest("atlas"))
.PostAsync("/api/v1/projects");
created.Should.HaveHttpStatus(HttpStatusCode.Created);
using var projects = await Proto.Context.GraphQL()
.Query("projects", new { first = 10 })
.ExpectAsync(new
{
totalCount = 1,
nodes = new[] { new { name = "atlas", status = ProjectStatuses.Active } }
});
projects.Should.HaveNoErrors();
}Each test gets its own Proto.Context. It carries the clients, the state and the trace for that test. Setup shared by the suite stays in the host composition. The scenario under test stays visible.
- One lifecycle independent of the runner. Adapters exist for NUnit, xUnit.net v2, xUnit.net v3, TUnit and MSTest.
- Integrations that share that lifecycle: REST, GraphQL, gRPC, SQL, Entity Framework Core, Playwright, Selenium, RabbitMQ, ASP.NET Core, Testcontainers, background workers and more. The integrations map marks what is supported and what is preview.
- One evidence trace per run. Every run writes a
.prototracefile with setup, teardown, operations and checks.
The trace is the failure story. Drop the .prototrace file on the viewer and read the run: lifecycle, requests, checks, resources, attachments.
Your agent fixes and writes tests; ProtoTest judges the result from the trace. The MCP server and the
prototest CLI tell the agent where a run left the last green one, prove a fix only when the test failed
before, passes now and broke nothing else, and say what each test actually checks. On a pull request, the
ProtoTest Evidence action posts what the change broke and
fixed. Coding agents covers the setup.
- Documentation
- Learning demo suite and the Learn track
- Why ProtoTest exists
- Support and sustainability
ProtoTest 1.x stays additive. Preview packages can still change before 1.2; the integrations map says which ones.
ProtoTest is MIT. AI assistance is used in development and disclosed per change; see the AI usage notes.


