A blog about software engineering — .NET, testing, architecture, and anything else worth writing about.
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. ...
Strangling SOAP: migrate to modern .NET without breaking clients
The Strangler Fig pattern is one of those transitional architecture patterns to get to a better system. But strangling SOAP is a bit difficult. If you just put a proxy in front of a SOAP service, you’ll quickly bump into a painful detail: SOAP typically exposes a single HTTP endpoint. All operations share one path, and the actual method is picked using headers like SOAPAction or action and the body contents. That makes the usual reverse‑proxy trick an “all or nothing” mechanism. Not at all a Strangler Fig approach. But there is a way! ...
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. ...
Testing as a First-Class Citizen of Architecture
Gáspár Nagy dropped a few interesting ideas and thoughts during the keynote of Living Documentation Event 2025. One of them was about testing and clean architecture, Or hexagonical-, union- or port and adaptors- architecture for that matter. Here is a quick recap of what clean architecture is about. The core concept is that all business rules and logic are encoded in Application & Domain. The layers Api / UI, sometimes called Presentation, and Infra (Infrastructure) keep the core clean from external influence like user interfaces, database details and such. The goal is that the core stays clean from all kinds of implementation details that do not contribute to actual business logic. ...
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. ...
Stryker in a CI/CD pipeline
In my last blog I wrote about why mutation testing is a better way of measuring test completeness. I also mentioned the drawback regarding performance. In this blog I’d like to discuss what Stryker does to increase performance and the things you can do in your pipeline to get the most out of mutations testing every check-in. What stryker already does Concurrency By default Stryker takes half of the available cores to do the work. Use the concurrency to use more or less cores of you system. I tested this on a 8 core machine. When using 4 core the whole process takes 02:42. Whit 8 cores that same process took almost 30 seconds less, 02:18. ...
Use mutation testing to replace code coverage
It is pretty common to use some sort of code coverage measurement tool along with unit tests to gather feedback on completeness of your test suite. Measuring code coverage is great start to find out if your code needs more testing. But by it’s nature it also comes with some caveats. In this article I’ll explain these caveats and how mutation testing fills these caps and turns out more valuable as a source of feedback. ...
Simplifying .NET solution upgrades with Directory.Build.props and Directory.Packages.props
With .NET 8 almost released it is time to make upgrading easier. In this blog I’ll explain about Directory.Build.props and Directory.Packages.props and how these can make upgrading easier. Most solutions consist of multiple projects. Even if all of your production code is in a single project chances are that your tests are in a different project. The separation that projects bring can be great, but sometimes managing dependencies can be a hassle. ...
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. ...
Source generation in System.Text.Json, should I care?
With the release of .NET 6 also came the option to use source generation in System.Text.Json. In short this means that instead of runtime reflection some of the work is now done compile time. This makes it more efficient. But how much? And should I care? Just measure it. I made a small project that you can use and adjust to measure the difference for your specific case. Let the results help you decide what’s best for your application. ...