Writing Integration Tests for Spring Boot Web Applications: Spring Profiles
Petri Kainulainen Blog
by Petri Kainulainen
3d 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
2w 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
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! 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
2M 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
5M 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
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! 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
My Black Friday Sale
Petri Kainulainen Blog
by Petri Kainulainen
5M ago
I am offering a 40 percent discount from the tax free prices of my text-based testing courses which I sell on cleantestautomation.com. Here are the discount prices of my testing courses: The Introduction to AssertJ-DB course describes how you can replace XML data set files with assertions written with Java (or any other JVM language) when you have to write assertions for data that's found from a relational database. This course has 6 lessons, 17 exercises, and 2 quizzes. The price of this course is 7,50€ + VAT. The Introduction to JUnit 5 course helps you to get started with JUnit 5 and teach ..read more
Visit website
The Best Tools for Writing Integration Tests for Spring Boot Web Applications
Petri Kainulainen Blog
by Petri Kainulainen
5M ago
Before we will learn how to write integration tests for Spring Boot web applications, it's a good idea to take a quick look at the tools which help us to write better tests. This blog post highlights six testing tools which we should use when we are writing integration tests for Spring Boot web applications. Let's begin. 1. JUnit 5 This is an obvious choice. JUnit 5 is the default testing framework of Spring Boot, but it's also an extremely popular testing framework that’s used to write tests for JVM applications. In other words, if we have to write tests for JVM applications in 2023, it's ver ..read more
Visit website
Clean Test Automation Monthly 10 / 2023
Petri Kainulainen Blog
by Petri Kainulainen
6M 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! WireMock joins the Testcontainers Official Modules Program announces the release of an official Testcontainers WireMock module. At the moment that module offers implementation for Java, Goland, and Python (more is coming soon). I love WireMock and it's great to see that it gets the "recognition" it deserves. Simplify Testing Golang Apps with testcontainers-go describes how w ..read more
Visit website
Clean Test Automation Monthly 9 / 2023
Petri Kainulainen Blog
by Petri Kainulainen
7M 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! Filtering JUnit 5 Tests With Maven and Gradle describes how we can select the invoked test cases by using tag expressions and filter tests with Maven and Gradle. ArchUnit: Testing Your Architecture is an interesting blog post that describes how we can make sure that our team members follow the architecture conventions by writing automated tests for the architecture of our ap ..read more
Visit website

Follow Petri Kainulainen Blog on FeedSpot

Continue with Google
Continue with Apple
OR