Integration testing with Playwright just got easier

In a previous blog post, I introduced the NuGet package Nwwz.Mvc.Testing. This package was designed to make it possible to make the WebApplicationFactory listen on a rela port to that you can use it with Playwright. The package implements a different WebApplicationFactory that spin up a Kestrel instance instead ot the in-memory TestServer. With the release of .NET 10, this workaround is no longer necessary. Microsoft has introduced a native way to run WebApplicationFactory using Kestrel. ...

8 February 2026 · 2 min · Jos Hendriks

Simplifying integration testing with .NET and Playwright

In my earlier blog, Integration Testing with Playwright and Testcontainers, I shared how to use a WebApplicationFactory with TestContainers and Playwright to set up integration tests. While this approach works well, I encountered a problem: the setup inadvertently spins up two separate hosts, leading to unwanted behaviour. Nwwz.Mvc.Testing I am introducing NuGet package Nwwz.Mvc.Testing to solve those issue.It’s a simple helper to easily setup a .NET application fro integration testing while allowing a browser to connect to it. ...

28 December 2024 · 3 min · Jos Hendriks