Clean Test Automation Monthly 6 / 2024
Petri Kainulainen Blog
by Petri Kainulainen
3w ago
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! Test-Driving HTML Templates is a comprehensive blog post that describes why we should write automated tests for the HTML generation logic and explains what kind of tests we can write. Using Mailpit with Spring Boot is a good blog post that describes how we can test our email sending logic (without sending any emails) by using Mailpit, Docker compose, and Testcontainers. How ..read more
Visit website
Clean Test Automation Monthly 5 / 2024
Petri Kainulainen Blog
by Petri Kainulainen
2M ago
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! What is your definition of a Unit, Integration, and End-to-End test? is an interesting Reddit discussion which kind of demonstrates that these terms aren't very useful because people have so many different definitions for them. Some things to consider when implementing contract testing is a thought-provoking blog post which identifies five things we should take into account ..read more
Visit website
3 Reasons Why We Shouldn’t Initialize Our Test Data With Production Code
Petri Kainulainen Blog
by Petri Kainulainen
2M ago
Automated testing is a crucial part of modern software development because it's an efficient way to make sure that our application is working as expected. However, there is a tempting shortcut that developers sometimes take: initializing test data with production code. This approach seems convenient because it looks like a quick and easy way for setting up different test scenarios. In fact, it's a risk that can undermine the very purpose of our testing efforts. In this blog post, I will identify three reasons why we shouldn't initialize our test data with production code and describe how we ca ..read more
Visit website
Clean Test Automation Monthly 4 / 2024
Petri Kainulainen Blog
by Petri Kainulainen
3M ago
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! Records for Cleaner and More Expressive Parameterized Tests in JUnit 5 is an excellent blog post that describes how we can write better parameterized tests by using Java records. Prefer Narrow Assertions in Unit Tests explains why we should write assertions which check only the relevant behavior. The WireMock Plugin for IntelliJ IDEA Is Here! provides a quick introduction to ..read more
Visit website
Writing Integration Tests for Spring Boot Web Applications: Spring Profiles
Petri Kainulainen Blog
by Petri Kainulainen
3M ago
When we are writing integration tests for Spring Boot (web) applications, we typically don't want to use the configuration that's used when we run our application in the development, test, or production environment. This blog post describes how we can leverage Spring profiles when we have to create a separate configuration for our integration tests. After we have finished this blog post, we: Know how we can use different configuration in different environments. Understand how we can build different application contexts for different environments. Let's begin. Using Different Configuration in ..read more
Visit website
Clean Test Automation Monthly 3 / 2024
Petri Kainulainen Blog
by Petri Kainulainen
3M ago
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! JUnit 5 – When to use CSV Providers is a good blog post that explains how we can use the @CsvSource and @CsvFileSource annotations when we are writing parameterized tests with JUnit 5 and describes when we should use these annotations. Test Parameterization With JUnit 5.7: A Deep Dive Into @EnumSource is an interesting blog post that provides a very comprehensive introductio ..read more
Visit website
Clean Test Automation Monthly 2 / 2024
Petri Kainulainen Blog
by Petri Kainulainen
5M ago
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! Relevant Spring Boot Testing Resources (2024) is an excellent blog post which contains a huge list of resources which help us to write tests for Spring Boot applications. That being said, the author has included my Test With Spring course in this article. I am flattered, but I must also point out that you cannot enroll to this course (this will change in the future) AND it's ..read more
Visit website
Writing Integration Tests for Spring Boot Web Applications: Build Setup
Petri Kainulainen Blog
by Petri Kainulainen
6M ago
When we want to write integration tests for Spring Boot web applications, the first thing that we have to do is to create a build that makes our life as easy as possible. In other words, we must create a build that allows us to decide what happens when we build our project. This blog post describes how we can create a Maven build that fulfills this requirement. After we have finished this blog post, we: Can identify the useful Maven profiles. Know how we can create the required Maven profiles. Understand why we should put different tests in different directories. Can create separate test and ..read more
Visit website
Java Developer Learns React #1: Extending Styles With Styled Components
Petri Kainulainen Blog
by Petri Kainulainen
8M ago
Recently I started to learn React (and frontend development in general) and it has been a really humbling experience. I think that the biggest reason for this is that I am used to writing traditional web applications and REST APIs with Spring and these applications use synchronous communication between the backend and the user / client. In React, most of the important things seem to be asynchronous which can be challenging if you like to try things out yourself before you read the user manual (old habits die hard). To make matters worse, the last time I did frontend development was when doing ..read more
Visit website
Clean Test Automation Monthly 11 / 2023
Petri Kainulainen Blog
by Petri Kainulainen
8M ago
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! Testcontainers Best Practices is an excellent blog post that highlights nine best practices which we should follow when we are writing tests which use Testcontainers. Avoid mocking the ObjectMapper! describes why we shouldn't mock the ObjectMapper when we are writing tests for code that uses the ObjectMapper. First, I agree that we should never replace the ObjectMapper with ..read more
Visit website

Follow Petri Kainulainen Blog on FeedSpot

Continue with Google
Continue with Apple
OR