aws / aws/aws-lambda-dotnet

WebApplicationFactory alternative for Annotations framework

Open
#1,151 7 comments 1 reaction 0 assignees View on GitHub
feature-request module/aspnetcore-support p3 queued
Dominant language
C#
Stars
1.7k
Forks
503
Avg merge
1d 5h
Merged PRs (30d)
18

Description

### Describe the feature

Microsoft provides WebApplicationFactory for AspNetCore in-memory integration testing. I think something similar could be done for AspNetCore lambdas.
It would parse generated (or created manually / via CDK) cloud formation template, and create an HttpClientHandler, which would route requests to corresponding lambda handlers instead of making actual http requests.

It should also be possible to replace configured services in DI container (in order to be possible to mock external services).

### Use Case

Integration testing for lambda serverless application project.

### Proposed Solution

_No response_

### Other Information

_No response_

### Acknowledgements

- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS .NET SDK and/or Package version used

Amazon.Lambda.Annotations 0.5.0-preview

### Targeted .NET Platform

.NET 6

### Operating System and version

Any

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.