Skip to content
MSeysPublic

About

Making .NET integration testing as simple, readable, and frictionless as writing a prototype.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

268 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProtoTest

CI NuGet License

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.

ProtoTest in 70 seconds: one real test, from the failure on CI to the proven fix

Watch ProtoTest in 70 seconds: one real test, from the failure on CI to the proven fix.

Try it

dotnet new install ProtoTest.Templates
dotnet new prototest -n Shop
cd Shop
dotnet test

The template suite is green on a fresh checkout. It hosts the app in process and needs no containers or browsers.

What a test looks like

[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.

What you get

  • 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 .prototrace file with setup, teardown, operations and checks.

When it fails

The trace is the failure story. Drop the .prototrace file on the viewer and read the run: lifecycle, requests, checks, resources, attachments.

ProtoTrace showing a failed integration test, its execution story, response mismatch and cleanup

Open the interactive trace

With a coding agent

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.

Learn

ProtoTest 1.x stays additive. Preview packages can still change before 1.2; the integrations map says which ones.

License

ProtoTest is MIT. AI assistance is used in development and disclosed per change; see the AI usage notes.

About

Making .NET integration testing as simple, readable, and frictionless as writing a prototype.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages