Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
4 posts found #webapplicationfactory
Reading Old Integration and E2E Tests: WebApplicationFactory from .NET 6 to 11, Testcontainers 3 to 4, Protractor to Playwright
Testing & Quality PART 09

Reading Old Integration and E2E Tests: WebApplicationFactory from .NET 6 to 11, Testcontainers 3 to 4, Protractor to Playwright

When reading an old integration test, the first question is which application the factory brings up: a Startup-based factory can compile on .NET 10 and return 404 without ever running Bookstore. With real builds and runs we cover how WebApplicationFactory changed from .NET 6 to 11, .NET 11's ConfigureWebApplicationBuilder hook, the Testcontainers 4 changes, moving off Protractor, and the breaking changes in Playwright 1.58–1.65.

14 Nov 2026 11 min 2
End-to-End Testing Bookstore: Bringing Up the API, Angular and the Database Together
Testing & Quality PART 07

End-to-End Testing Bookstore: Bringing Up the API, Angular and the Database Together

Playwright's webServer starts two processes: a .NET host that opens the SQL Server container and runs the API on a real port with WebApplicationFactory.UseKestrel, and ng serve. With real runs we show three surprises in the host, signing in once with a setup project and storageState, preparing test data through the API, combining page objects with fixtures, and UseKestrel ignoring the port with WithWebHostBuilder.

14 Nov 2026 16 min 2
WebApplicationFactory in Depth: Custom Factory, ConfigureTestServices, Configuration and Test Authentication
Testing & Quality PART 02

WebApplicationFactory in Depth: Custom Factory, ConfigureTestServices, Configuration and Test Authentication

Pass test configuration with UseSetting or CreateHost; a value given with ConfigureAppConfiguration never reaches what Program.cs reads before Build. With measurements we show replacing services in a custom factory, telling 401 from 403 with a header-based test authentication handler, redirect and ProblemDetails helpers, the real cost of WithWebHostBuilder, and background services running in tests by accident.

14 Nov 2026 13 min 1
Integration Testing Infrastructure in .NET 10: What Runs Real and What Is Faked?
Testing & Quality PART 01

Integration Testing Infrastructure in .NET 10: What Runs Real and What Is Faked?

In this series an integration test runs the API inside the test process with its production pipeline and the database as a real SQL Server container; only external services such as payment, shipping and email are faked at the boundary. We show with real runs how SQLite and InMemory differ in collation, length, precision and transactions, then set up an xUnit v3 + Testcontainers skeleton kept apart from unit tests.

14 Nov 2026 15 min 1
Blog Map