Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.78 KB

README.md

File metadata and controls

47 lines (32 loc) · 1.78 KB

Alba

Alba

Discord Nuget Nuget

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

JasperFx logo

While Alba is open source, JasperFx Software offers paid support and consulting contracts for Alba.