Shirubasoft.Aspire.ModularAppHosts.Testing
13.2.0
dotnet add package Shirubasoft.Aspire.ModularAppHosts.Testing --version 13.2.0
NuGet\Install-Package Shirubasoft.Aspire.ModularAppHosts.Testing -Version 13.2.0
<PackageReference Include="Shirubasoft.Aspire.ModularAppHosts.Testing" Version="13.2.0" />
<PackageVersion Include="Shirubasoft.Aspire.ModularAppHosts.Testing" Version="13.2.0" />
<PackageReference Include="Shirubasoft.Aspire.ModularAppHosts.Testing" />
paket add Shirubasoft.Aspire.ModularAppHosts.Testing --version 13.2.0
#r "nuget: Shirubasoft.Aspire.ModularAppHosts.Testing, 13.2.0"
#:package Shirubasoft.Aspire.ModularAppHosts.Testing@13.2.0
#addin nuget:?package=Shirubasoft.Aspire.ModularAppHosts.Testing&version=13.2.0
#tool nuget:?package=Shirubasoft.Aspire.ModularAppHosts.Testing&version=13.2.0
Shirubasoft.Aspire.ModularAppHosts.Testing
Run the same Aspire E2E test suite against an in-process AppHost or an Aspire-managed Docker Compose deployment. The package implements Compose mode through IDistributedApplicationTestingBuilder and keeps testing and Docker dependencies out of regular AppHosts.
dotnet add package Shirubasoft.Aspire.ModularAppHosts.Testing
Export the endpoints and values an external deployment test needs:
compose
.WithTestEndpoint(
"catalog-api",
catalog.Api.GetEndpoint("http"),
healthCheckPath: "/health")
.WithTestValue("Parameters:api-key", apiKey.Resource)
.WithTestConnectionString("catalog", catalogDatabase);
Then pass the selected mode into a shared scenario:
static async Task RunScenarioAsync(string mode)
{
await using IDistributedApplicationTestingBuilder builder = mode switch
{
"apphost" => await DistributedApplicationTestingBuilder
.CreateAsync<Projects.EShop_E2E_AppHost>(),
"compose" => await DockerComposeDeploymentTestingBuilder
.DeployAsync<Projects.EShop_E2E_AppHost>(),
_ => throw new InvalidOperationException($"Unknown E2E mode '{mode}'.")
};
await using var app = await builder.BuildAsync();
await app.StartAsync();
await app.ResourceNotifications.WaitForResourceHealthyAsync("catalog-api");
// Run shared assertions.
}
DeployAsync deploys through Aspire, imports the resolved endpoints and configuration, and destroys the deployment when the builder is disposed. It prefers a restored local Aspire tool manifest, retries detected host-port bind conflicts once, and allows both behaviors to be overridden through DockerComposeDeploymentOptions. Create and CreateFromEnvironment import a deployment owned by another system.
Endpoint names and multiple endpoints per resource are preserved, so the same CreateHttpClient(resourceName, endpointName) calls work in both modes. Pass DockerComposeDeploymentOptions when CI needs an explicit environment, output path, Aspire CLI path, or deploy/cleanup timeouts. Aspire CLI output is streamed during deployment and cleanup.
Read the E2E testing guide for endpoint requirements, lifecycle options, and CI configuration. The repository also includes a complete catalog-and-orders sample.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Aspire.Hosting.Docker (>= 13.4.6)
- Aspire.Hosting.Testing (>= 13.4.6)
- CliWrap (>= 3.10.4)
- Shirubasoft.Aspire.ModularAppHosts (>= 13.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 13.2.0 | 0 | 8/18/2026 |
| 13.1.0 | 92 | 8/15/2026 |
| 13.0.0 | 94 | 8/14/2026 |
| 12.0.1 | 82 | 8/14/2026 |
| 12.0.0 | 84 | 8/14/2026 |
| 11.0.0 | 79 | 8/13/2026 |
| 10.0.1 | 83 | 8/12/2026 |
| 10.0.0 | 85 | 8/12/2026 |
| 9.0.0 | 80 | 8/11/2026 |
| 8.1.0 | 87 | 8/11/2026 |
| 8.0.0 | 78 | 8/11/2026 |
| 7.0.0 | 81 | 8/10/2026 |
| 6.0.0 | 90 | 8/8/2026 |
| 5.0.0 | 85 | 8/7/2026 |
| 4.3.0 | 87 | 8/7/2026 |
| 4.2.0 | 85 | 8/6/2026 |
| 4.1.0 | 92 | 8/6/2026 |
| 4.0.0 | 91 | 8/5/2026 |
| 3.0.0 | 85 | 8/5/2026 |
| 2.0.0 | 88 | 8/5/2026 |