Skip to content

Testing

A Quick Start With Playwright

Playwright is a reliable end-to-end testing framework for web applications. It is open-source and available for C#, Java, JavaScript, and Python. While it is similar to Selenium and Cypress, Playwright has its own twist on testing and offers a nice set of tools to make writing tests less tedious. Since Microsoft is putting a lot of resources into Playwright, I expect it to be around for the long haul.

How to Test the Emails Send by MailKit in .Net 5?

In a .Net Full Framework application we could use the property SpecifiedPickupDirectory in our mailSettings and the emails got stored to disk instead of sending them to the recipient. That allowed us to check them manually or in our test code.

For .Net 5 you should no longer use System.Net.Mail.SmtpClient and instead use MailKit. However, testing is a lot harder then MailKit does not offer such a convenient way to dump your emails to disk. Let us explore what we can do to check that our applications send the right emails.

Docker & .Net 4.8: An Endless Obstacle Course

The more complex an application becomes, the greater is the benefit of Docker. If everything runs in containers, we can use a tool like docker-compose and start all the parts with one single command. No need to install all the tools, services, and frameworks - just run docker-compose and the magic happens automatically. We can go from nothing to the full running application in a few minutes.

Since I saw the talk "Dev and Test Agility for your Database with Docker" by Julie Lerman at NDC Oslo 2019 I wanted to port her solution for .Net Core to the .Net Full Framework. How hard could it be? As it turns out, it is an awful lot of work and a few weeks ago Microsoft made it even harder.

The Gilded Rose Kata

Code katas are little exercises that help you to improve your programming skills. My favourite one is the Gilded Rose kata. It was originally created by Terry Hughes and is now maintained by Emily Bache (@emilybache).

While most katas start from scratch, the Gilded Rose kata comes with existing code that you need to modify. This code is available for more than 40 programming languages and covers most likely your favourite language.