Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Testing with Aspire: End-to-End Tests That Start the Whole System with Aspire.Hosting.Testing
Aspire.Hosting.Testing really starts the AppHost in a test fixture and hands out HttpClients for resources; it suits a few critical end-to-end scenarios and doesn't replace in-service tests. The post keeps tests away from the developer's database, starts only the containers each scenario needs, shows the template's retry repeating a POST and causing a 409, and waits for an asynchronous confirmation by polling instead of Task.Delay, with real output.
Integration Testing an ASP.NET Core Web API: End-to-End Tests with WebApplicationFactory
We spin up an ASP.NET Core Web API in memory with WebApplicationFactory and test it at the HTTP level: public partial class Program, swapping the database for in-memory SQLite, Location and ProblemDetails tests, and test isolation.