Clean Test Automation Monthly 1 / 2025

The Clean Test Automation Monthly is a monthly blog post that highlights the best test automation content which I read during the current month. This blog post is always published on the last day of the month.

Let's begin!

Use GreenMail For Spring Mail (JavaMailSender) JUnit 5 Integration Tests demonstrates how we can write tests for email sending logic with JUnit 5 and Greenmail. If we use Greenmail for this purpose, we can ensure that our email sending logic is working as expected without the risk of sending unintended emails.

Mocking OAuth2 Flows in Spring Boot with WireMock describes how we can simulate an OAuth2 identity provider with WireMock when we are writing integration tests for code which expects that the user is authenticated with OAuth2. Because the tests which use this approach won't depend on an external OAuth2 identity provider, they will be both fast and reliable (aka non-flaky).

My first steps with Playwright describes how the author was able to scrape his follower metrics from LinkedIn by using Python and Playwright. To be more specific, this blog post explains how we can log in to LinkedIn, store cookies (so that we don't get an email every time when we run the tool), and scrape the follower metrics.

Don’t use "code coverage" as a KPI explains why it's a bad idea to use code coverage as a quality metric and argues that we should use code coverage as a "code smell detector".

Exploring the AssertJ Integration and New MockMvcTester Class in Spring Boot 3.4 provides a quick introduction to MockMvcTester which integrates MockMvc with AssertJ. The blog post also demonstrates how we can write tests by using a fluent API and specify our expectations with AssertJ.

1 comment… add one

Leave a Reply