Aspire.Hosting.Testing supplies components for integration testing Aspire applications. Its libraries work with xUnit, NUnit, and MSTest; xUnit is the default for the Aspire test-project template. section 6.6.1 section 6.6.2
To prepare a test project for testing the whole Aspire application:
- Add a reference to the Aspire.Hosting.Testing NuGet package. section 6.6.2
- Reference the application’s AppHost project from the test project. section 6.6.2
dotnet new aspire-xunit
Create an xUnit Aspire test project with the .NET CLI. section 6.6.1
