Petri Kainulainen's Avatar

Petri Kainulainen

@petrikainulainen.bsky.social

Spring ninja, summer rock star, autumn hacker, and winter guru. I write code. Titles are irrelevant.

60 Followers  |  16 Following  |  69 Posts  |  Joined: 06.02.2024  |  1.6756

Latest posts by petrikainulainen.bsky.social on Bluesky

Clean Test Automation Monthly 7 / 2025 - Petri Kainulainen The clean test automation monthly highlights 11 interesting or useful test automation blog posts which I read during July 2025.

HIGHLIGHTS: the rules and roles of AI assisted testing, how to create a useful logging config for Spring Boot tests, and learn to write performance tests with Playwright and Lighthouse.

01.08.2025 10:05 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Fault tolerance and resilience patterns for the JVM Failsafe website

New in my toolkit (after resilience4j and Spring Retry): #failsafe

failsafe.dev

Nice api, clear docs, easy and flexible to integrate and use. Well done.

#java #awesomeEcoSystem

01.07.2025 10:55 β€” πŸ‘ 10    πŸ” 3    πŸ’¬ 1    πŸ“Œ 0
React Still Feels Insane And No One Is Talking About It

Interesting article.

01.07.2025 09:11 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I will grab Elden Ring and Horizon Forbidden West from the Steam's summer sale. The price is decent and I guess these (+ Rocket League) will keep me entertained for the rest of this year.

01.07.2025 06:56 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Clean Test Automation Monthly 6 / 2025 - Petri Kainulainen The clean test automation monthly highlights 14 interesting or useful test automation blog posts which I read during June 2025.

HIGHLIGHTS: a good test name is a sentence, how to write parameterized test classes with JUnit 5, and supercharge your Playwright tests with the Chrome DevTools Protocol.

30.06.2025 16:49 β€” πŸ‘ 0    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Preview
How I write production-ready Spring Boot applications This blog post will explain how I currently write Spring Boot applications. I have been writing Java for over 25 years, and most of that involved Spring and its ecosystem. I will talk about how I arch...

I use a somewhat similar approach.

28.06.2025 07:16 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

I have come to the conclusion that I will monetize my blog. Have you done the same? If yes, what membership plugin / service did you use?

10.06.2025 14:51 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

This is an excellent post.

10.06.2025 11:46 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
@ParameterizedClass
@ValueSource(strings = {"foo", "bar"})
class SomeTests {
    @Parameter String value;
    
    @Test
    void shouldNotBeNull() {
        assertNotNull(value);
    }
    @Test
    void lengthShouldBeThree() {
        assertEquals(3, value.length());
    }
}

@ParameterizedClass @ValueSource(strings = {"foo", "bar"}) class SomeTests { @Parameter String value; @Test void shouldNotBeNull() { assertNotNull(value); } @Test void lengthShouldBeThree() { assertEquals(3, value.length()); } }

✨ New blog post: "STF Milestone 4: Parameterized test classes"

JUnit 5.13 introduced parameterized test classes (in addition to methods). They are a powerful testing tool that has long been missing from JUnit Jupiter...

πŸ‘‰ marcphilipp.de/blog/2025/06...

07.06.2025 11:52 β€” πŸ‘ 31    πŸ” 11    πŸ’¬ 0    πŸ“Œ 0

I think people go through various phases of using AI:

1. AI is just a hype
2. AI seems to be helpful
3. Wow, AI is amazing and it's going to take away our jobs
4. OMG, AI made my codebase a mess
5. Okay, so I need to do the thinking and use AI to carry out the tasks.

31.05.2025 16:17 β€” πŸ‘ 3    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0

That's actually how I did it. So, I wrote the guidelines with Markdown and then opened it, asked assistant to check my instructions and then for example generate some code. Can you use guideline files if you aren't using JUnie?

31.05.2025 18:53 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I am testing the Jetbrains AI Assistant and I have noticed that I can pass guidelines to AI chat by following these steps: 1) Open the markdown file which contains the guidelines 2) Open AI Chat and allows access to code base 3) Ask the assistant to read guidelines and generate code. Interesting.

31.05.2025 11:30 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Clean Test Automation Monthly 5 / 2025 - Petri Kainulainen The clean test automation monthly highlights 23 interesting or useful test automation blog posts which I read during May 2025.

Highlights: how to generate good tests with AI, 3 ways to run a Docker container with Testcontainers when we are writing integration tests for Spring Boot applications, and vibe testing with Playwright.

31.05.2025 09:53 β€” πŸ‘ 2    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0
Preview
[BUG] [SPRING] annotationLibrary is ignored Β· Issue #11460 Β· OpenAPITools/openapi-generator Hi. I'm using the latest version of the generator (5.3.1) and, according to the spring generator documentation, I should be able to not generate the Swagger annotations by setting annotationLibrary...

If you want to generate Spring controllers with openapi-generator-maven-plugin and you don't want to include Swagger annotations in the generated code, this comment describes the configuration you have to use: github.com/OpenAPITools...

26.05.2025 19:47 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Fluent APIs Are More Than Just Chaining Β· Poutsma Principles

Good point.

26.05.2025 17:56 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Sure thing. I actually got guide excited about the coding guidelines because that sounds like a great way to both share guidelines for team members and of specify what kind of code should be generated.

22.05.2025 06:02 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Sometimes vibe-coding is relaxing, and sometimes it's not.

21.05.2025 19:25 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
GitHub - JetBrains/junie-guidelines Contribute to JetBrains/junie-guidelines development by creating an account on GitHub.

Want to use Junie AI Agent for developing #SpringBoot applications.

You should checkout the guidelines repository github.com/JetBrains/ju...

You can use "guidelines" files for AI Agents, "guidelines-with-explanations" files for developer understanding.

Your contributions are most welcome!

21.05.2025 12:20 β€” πŸ‘ 9    πŸ” 3    πŸ’¬ 0    πŸ“Œ 0
Spring JdbcClient: A better alternative to JdbcTemplate
YouTube video by IntelliJ IDEA, a JetBrains IDE Spring JdbcClient: A better alternative to JdbcTemplate

Spring JdbcClient: A better alternative to JdbcTemplate

www.youtube.com/watch?v=oF7v...

A practical hands-on tutorial on how to use JdbcClient to interact with SQL databases.

20.05.2025 11:00 β€” πŸ‘ 10    πŸ” 5    πŸ’¬ 0    πŸ“Œ 0

I think that I will try Jetbrains AI. I have a personal project which I will start from the scratch and it will be interesting to see if it can write the "boring" code when it has access to the code base.

21.05.2025 09:29 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Expectations vs. Reality

20.05.2025 08:22 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

The Efficiency Delusion

19.05.2025 11:56 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Updated rate limits for unauthenticated requests | Hacker News

I find it a bit funny that Github doesn't want to train AI bots: news.ycombinator.com/item?id=4393...

15.05.2025 07:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Writing Unit Test With MockMvcTester: Returning an Object as JSON - Petri Kainulainen This blog post helps us to identify the required test cases and describes how we can write unit tests for a Spring MVC REST API endpoint that returns an object as JSON.

Learn to write unit tests for a #SpringBoot REST API endpoint that returns an object as JSON. This guide identifies the key tests, shows how to eliminate duplicate request building code, and demonstrates how to write the required assertions with MockMvcTester and AssertJ.

13.05.2025 15:19 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Preview
a person is running with a skateboard in their hands ALT: a person is running with a skateboard in their hands

When you hear "Database is just an implementation detail"...RUN.

09.05.2025 06:46 β€” πŸ‘ 2    πŸ” 2    πŸ’¬ 1    πŸ“Œ 1
AI is Making Developers Lazy: RIP Core Coding Skills The hum of the AI co-pilot has become a familiar soundtrack in the world of software development. These intelligent tools, promising increased efficiency and code generation prowess, have been embrace...

If you always take the easiest path, you won't learn anything.

07.05.2025 14:56 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

My employer does pay for SW which I need, but I also pay several licenses from my own pocket. These include tools like Little Snitch, iStat Menus, IntelliJ Idea, ChatGTP, Transmit, Sublime Text, and many others.

07.05.2025 07:31 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
AI code is legacy code from day one - Text Incubation It seems like there are a few stages in the life of a codebase (and/or parts of it), that dictate its likelihood of deep improvement. 1. When something is new, and you’re the one who built it: β€œOh ye…

I did some thinking and came to the conclusion that I have encountered three systems which I would call legacy code. Two of them were actively developed and used an in-house "framework". No one wanted to touch the third one because they were afraid that it will break.

05.05.2025 20:28 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Catch Missing `await` Calls in Playwright Tests with ESLint Have you ever run a Playwright test that just... didn’t behave as expected? Maybe it failed randomly....

This is quite easy to do and very helpful.

04.05.2025 08:58 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Top 5 Spring Boot Testing Myths - rieckpil Debunk the top 5 testing myths about testing Spring Boot applications. Learn best practices for faster, effective tests.

This blog post explains why these myths were born and argues that these myths aren't a problem IF we use Spring Boot in the correct way.

03.05.2025 07:26 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1

@petrikainulainen is following 16 prominent accounts