Supercharged integration testing for ASP.NET Core HTTP endpoints
Install
| Product | Versions |
|---|---|
| .NET |
README
Alba
Alba is a .NET library for fast, readable integration tests of ASP.NET Core applications. An Alba scenario runs an
HTTP request through your whole application in memory with ASP.NET Core's TestServer and checks the response with a
declarative API. It works with xUnit, NUnit and TUnit, and Alba 9 supports .NET 10 and .NET 11.
dotnet add package Alba
await using var host = await AlbaHost.For<Program>();
await host.Scenario(_ =>
{
_.Post.Json(new CreateItem("Widget")).ToUrl("/items");
_.StatusCodeShouldBe(201);
_.JsonPath("$.name").ShouldBe("Widget");
});
Check out the documentation for more examples. AI coding agents can use the Alba agent prompt and the docs in llms.txt form.
To work with the code, just open the solution at src/Alba.sln and go. No other setup necessary.
To run the documentation locally, use build docs on Windows or ./build.sh docs on Linux or OSX. The documentation website will require
a recent installation of NPM. The documentation is built with VitePress.
Support Plans
While Alba is open source, JasperFx Software offers paid support and consulting contracts for Alba.
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.