The Clean Test Automation Monthly is a monthly blog post that shares interesting or useful test automation content which I consumed during the current month. This blog post is always published on the last day of the month.
Let's begin!
Test Design
Testing the untestable: 4 practical techniques for unit testing web user interfaces introduces four techniques which make it easier to write unit tests for web UIs.
Taming backend complexity: lessons from a decade of TDD describes how TDD has helped the author to identify the common pain points of enterprise applications and identifies four design decisions which can make it easier or harder to write tests for data access code.
The Day I Stopped Trusting My Load Tests explains why traditional load tests won't help us to be ready for exceptional situations and describes how using a Monte Carlo simulation allows us to solve this problem.
On Unit / Integration / Regression Tests and Terminology defines the terms unit, integration, and regression test, and helps us to decide what kind of tests we should write.
It’s Not Your Tests, It’s Your Testability explains how we can convince other developers to write code that can be tested.
Backend
Mocking Logger and LoggerFactory describes how we can replace a Logger object with a mock. This is useful if we have to ensure that the expected log message is written to the log.
How to Unit Test Micrometer helps us to write our first unit tests for Micrometer metrics.
What’s new in JUnit 6: Key Changes and Improvements provides a quick overview of the changes and improvements of JUnit 6.
JUnit 6 is here, what does it mean for Vert.x users? describes what we have to do if we want to use JUnit 6 with Vert.x.
Testing the Untestable describes how we can write tests for an over 10 year old code which invokes static methods.
Testing REST APIs in Quarkus: Faster, Real, and Production-Ready explains how we can write fast and comprehensive tests for REST API endpoints with Rest Assured.
UI / End-to-End
10 Tips for Writing Playwright Tests with Cursor shares 10 tips which help us to generate "good" Playwright tests with Cursor. I personally think that the tip number nine is the most important.
Understanding Playwright Agents identifies the different AI modes, explains the difference between the agent mode and the other modes, and provides an introduction to the Playwright agents called the planner, the generator, and the healer.
2FA testing with Playwright and Mailosaur describes how we can write end-to-end tests for 2FA with Mailosaur and Playwright. To be more specific, this blog post explains how we can handle magic login links, SMS verification codes, and TOTP (aka authenticator apps).