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

Playwright in a single file dotnet app

One of the recent additions in .NET is that you can now have single file projects. In this article we’ll explore how to use Playwright in such file. TL;DR: Full example at the end of this page. Why? More and more I use Playwright not only for testing but also for small automation scripts and to quickly make demos using it’s handy built-in recorder. Before .NET 10 that would required a C# project, a directory with a csproj file a cs file and the Playwright package installed. ...

14 November 2025 · 3 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

Integration testing with Playwright and Testcontainers in ASP.NET

Testing plays a crucial role in software development and we strive to test as much as possible using isolated unittests. However, there are times when these unittests fail to capture issues that arise when the entire application is tested. Such issues may include discrepancies between front-end and back-end implementation of APIs, or differences in behavior between real and mocked databases. These problems can be easily identified by running a series of scenarios that test the entire application, including the front-end, back-end, and database. Many developers resort to manual testing to achieve this, but automated testing offers greater repeatability and the ability to integrate checks into the development pipeline. ...

13 March 2023 · 7 min · Jos Hendriks