Anarchy.Toolkit.Testing.Runtime.Web.Aws
3.0.0
dotnet add package Anarchy.Toolkit.Testing.Runtime.Web.Aws --version 3.0.0
NuGet\Install-Package Anarchy.Toolkit.Testing.Runtime.Web.Aws -Version 3.0.0
<PackageReference Include="Anarchy.Toolkit.Testing.Runtime.Web.Aws" Version="3.0.0" />
<PackageVersion Include="Anarchy.Toolkit.Testing.Runtime.Web.Aws" Version="3.0.0" />
<PackageReference Include="Anarchy.Toolkit.Testing.Runtime.Web.Aws" />
paket add Anarchy.Toolkit.Testing.Runtime.Web.Aws --version 3.0.0
#r "nuget: Anarchy.Toolkit.Testing.Runtime.Web.Aws, 3.0.0"
#:package Anarchy.Toolkit.Testing.Runtime.Web.Aws@3.0.0
#addin nuget:?package=Anarchy.Toolkit.Testing.Runtime.Web.Aws&version=3.0.0
#tool nuget:?package=Anarchy.Toolkit.Testing.Runtime.Web.Aws&version=3.0.0
Anarchy.Toolkit.Testing.Runtime.Web.Aws
Part of Anarchy I/O Toolkit, a .NET developer platform · Pillar: Infrastructure · Layer: Testing kit · Package catalog
Test helpers for REST APIs deployed both natively and as AWS Lambda functions.
dotnet add package Anarchy.Toolkit.Testing.Runtime.Web.Aws
- Derive from
AwsRestApiTestCaseBase<TStartup, TAppSettings>:TestEndpointAsyncruns the native and Lambda pipelines and compares them;TestEndpointLambdaAsyncruns the Lambda pipeline only. TestableLambdaEntrypointhosts the Lambda pipeline in the Development environment.ToApiGatewayProxyRequestAsync,ToApiGatewayHttpApiV2ProxyRequestAsyncandToApplicationLoadBalancerRequestAsyncconvert anHttpRequestMessage;response.Should().HaveStatusCodeOrDump(...)asserts API Gateway responses.- For an
AwsWebAppMultiTriggerEntryPointBase,entryPoint.InvokeAsync(request, LambdaTrigger.HttpApiV2)calls the handler of a trigger and returns aLambdaHttpResponse, andTestEndpointLambdaAsync(entryPoint, trigger, request, status, assertions)asserts it like the REST path.
When to use it
Use this package for APIs that ship an AwsWebAppEntryPointBase or AwsWebAppMultiTriggerEntryPointBase handler. APIs without a Lambda entry point use Anarchy.Toolkit.Testing.Runtime.Web.
How to use it
public class OrdersApiTest(WebApplicationFactory<Startup> factory)
: AwsRestApiTestCaseBase<Startup, AppSettings>(new TestableLambdaEntrypoint<Startup>(), factory, ["orders:read"]);
See the package catalog and toolkit overview.
Releases
See the release notes for the complete release history.
| 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
- Amazon.Extensions.Configuration.SystemsManager (>= 7.1.1)
- Amazon.Lambda.APIGatewayEvents (>= 3.0.1)
- Amazon.Lambda.AspNetCoreServer (>= 10.3.2)
- Amazon.Lambda.Core (>= 3.4.0)
- Amazon.Lambda.TestUtilities (>= 4.3.0)
- Anarchy.Toolkit.Runtime.Web.Aws (>= 3.0.0)
- Anarchy.Toolkit.Testing.Runtime.Web (>= 3.0.0)
- AwesomeAssertions (>= 9.6.0)
- AWSSDK.Core (>= 4.1.1.2)
- AWSSDK.KeyManagementService (>= 4.1.1.1)
- AWSSDK.SecretsManager (>= 4.1.1.2)
- Humanizer (>= 3.0.10)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 10.0.15)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 10.0.15)
- Microsoft.AspNetCore.Mvc.Testing (>= 10.0.15)
- Microsoft.Extensions.Hosting.Systemd (>= 10.0.15)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.23.0)
- Microsoft.NET.Test.Sdk (>= 18.12.0)
- Moq (>= 4.21.0)
- Newtonsoft.Json (>= 13.0.4)
- Spectre.Console (>= 0.57.2)
- System.IdentityModel.Tokens.Jwt (>= 8.23.0)
- xunit.v3.extensibility.core (>= 4.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
## Releases
### 3.0.0
- Add HTTP API 2.0 and ALB request builders, `InvokeAsync(request, LambdaTrigger)` and a trigger-aware `TestEndpointLambdaAsync`.
- The REST and HTTP API 2.0 request builders set the request context's domain name, as API Gateway does, so the Lambda host no longer warns about it.
- Update dependencies for the current package release.
### 2.0.0
- feat(Core)!: Add health and telemetry extension points
- feat(Infrastructure): Add configurable provider and messaging seams
- feat(Bootstrap)!: Classify environments safely and configure AWS secrets
- feat(Runtime)!: Add hosting health workers and UI extensibility
- feat(Testing): Extend mock server and AWS test helpers
- build(solution): Register cache packages and update tooling
### 1.0.0
- Introduced the package with the AWS implementations extracted from its provider-neutral parent.