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
Quality Coaching Scenario: This code won’t take tests provides five tips which help us to write automated tests for a legacy application that cannot be unit tested and explains why we should follow the approach suggested by this blog post.
The Code Was 100% Tested — And 100% Broken is a thought-provoking article which explains why 100% code coverage doesn't guarantee that our application works as expected.
Test code should rarely be resilient argues that an automated test should fail as fast as possible and should fail for only one reason.
Why You Should Test with Real Data (Sometimes) argues that tests which use real data catch real-world issues which are often missed by tests which use mocks, describes what we should take into account when we use real data, identifies the situations when we shouldn't use real data, and gives tips which help us to build a solid test suite which leverages both mocks and real data.
You should delete tests is a thought-provoking blog post which argues that sometimes the best thing we can do is to delete our tests.
Backend
How I test production-ready Spring Boot applications is a comprehensive blog post which explains how the author writes both unit and integration tests for Spring Boot web applications with JUnit 5.
Achieve Faster Build Times with the Spring Test Profiler describes how we can configure and use Spring Test Profiler which collects performance data during test runs, identifies performance bottlenecks, and provides suggestions which help us to improve the performance of our test suite.
AI for API Testing: How I Used AI and Star Trek to Generate Better Test Cases describes how we can use AI for generating tests cases for a REST API that's documented with OpenAPI.
What I Learned Using GitHub Copilot for API Automation explains how the author generated API tests for a REST API with GitHub Copilot and identifies four things the author learned during this process.
Intro to @ClassTemplate Annotation in JUnit provides an introduction to class templates which were introduced in JUnit Jupiter 5.13.0.
UI / End-to-End
Tracking UI to API Connections with Playwright describes how we can write automated tests which ensure that the expected API endpoint was invoked and the expected data was sent to the invoked API endpoint.
UI Testing Locators Guide: How to Write Stable and Maintainable Selectors provides five rules which help us to write locators that make our tests stable and as easy to maintain as possible.
Global Cache: Make Playwright BeforeAll Run Once for All Workers identifies three different ways to set up authentication in our Playwright tests. Because none of these options is perfect, the author introduces their own solution which helps us to run our setup code only once for all workers.
Automating Animation Testing with Playwright: A Practical Guide helps us to write automated tests for animations which are often used in web applications.
Does Your Web App Fail Gracefully? identifies four common failure scenarios and provides tips which help us to write automated tests that ensure that our web application fails gracefully.