Sign in

Petri Kainulainen

@petrikainulainen.bsky.social
66 followers 16 following 81 posts

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

PostsRepliesMedia
Petri Kainulainen @petrikainulainen.bsky.social · 15/05/2026
Getting Started With #MockK: The Setup Learn to get the required dependencies with Maven and Gradle, and understand how you can create mocks with MockK when you are writing unit tests for a #kotlin application with #JUnit Jupiter. Read the blog post: www.petrikainulainen.net/programming/...
petrikainulainen.net
Getting Started With MockK: The Setup - Petri Kainulainen
Learn to configure Kotlin unit tests which use MockK and JUnit Jupiter. Explore manual vs. extension-based setup strategies and their impact on test isolation.
000
Petri Kainulainen @petrikainulainen.bsky.social · 15/11/2025
This blog post highlights six success stories from my short AI assisted engineering journey.
petrikainulainen.net
AI Assisted Engineering With an AI Chatbot - From Idea to Working Code - Petri Kainulainen
This blog post highlights six situations when AI assisted engineering helped me to get the job done faster.
000
Petri Kainulainen @petrikainulainen.bsky.social · 11/11/2025
19 interesting SW development articles which I read during October 2025: www.petrikainulainen.net/monthly/soft... - HIGHLIGHTS: solving the wrong problem, your data their rules, and why we tend to avoid public conversations.
petrikainulainen.net
Software Development Monthly 10 / 2025 - Petri Kainulainen
The software development monthly highlights 19 interesting or useful blog posts which I read during October 2025.
010
Petri Kainulainen @petrikainulainen.bsky.social · 03/11/2025
HIGHLIGHTS: Taming backend complexity: lessons from a decade of TDD, What's new in JUnit 6, and 2FA testing with Playwright and Mailosaur.
petrikainulainen.net
Clean Test Automation Monthly 10 / 2025 - Petri Kainulainen
The clean test automation monthly highlights 14 interesting or useful test automation blog posts which I read during October 2025.
010
Petri Kainulainen @petrikainulainen.bsky.social · 07/10/2025
19 interesting SW development blog posts which I read in September 2025. HIGHLIGHTS: why I am declining your AI generated MR, keeping secrets out of logs, and are the SOLID principles outdated
petrikainulainen.net
Software Development Monthly 9 / 2025 - Petri Kainulainen
The software development monthly highlights 19 interesting or useful blog posts which I read during September 2025.
000
Petri Kainulainen @petrikainulainen.bsky.social · 30/09/2025
21 interesting test automation articles which I read during September 2025. Highlights: the Tetris principle, how to optimize your Spring Boot integration tests, and how to write your first performance tests with Grafana k6.
petrikainulainen.net
Clean Test Automation Monthly 9 / 2025 - Petri Kainulainen
The clean test automation monthly highlights 21 interesting or useful test automation blog posts which I read during September 2025.
010
Petri Kainulainen @petrikainulainen.bsky.social · 09/09/2025
An interesting article which explains why some people cannot pass technical interviews which include a live coding session.
hadid.dev
Live coding sucks
Live coding measure stress, not coding skills
000
Petri Kainulainen @petrikainulainen.bsky.social · 09/09/2025
You should always take responsibility for the code you commit.
alexkondov.com
I Know When You're Vibe Coding
I shouldn’t have to care about this. I don’t want to care about how someone’s code gets into the IDE. Whether you wrote it by hand, copied it from a forum…
120
Petri Kainulainen @petrikainulainen.bsky.social · 08/09/2025
15 interesting SW development blog posts which I read in August 2025. HIGHLIGHTS: I Know When You Are Vibe Coding, AWS deleted my 10-year account and all data without warning, and Live Coding Sucks.
petrikainulainen.net
Software Development Monthly 8 / 2025 - Petri Kainulainen
The software development monthly highlights 15 interesting or useful blog posts which I read during august 2025.
000
Petri Kainulainen @petrikainulainen.bsky.social · 04/09/2025
Why I Fired Google and Gave an AI Chatbot a Shot: www.petrikainulainen.net/software-dev...
000
Petri Kainulainen @petrikainulainen.bsky.social · 01/09/2025
HIGHLIGHTS: how to write automated tests for a legacy application that cannot be unit tested, learn to test production-ready Spring Boot applications, and how to write Playwright tests which verify that the expected interactions happen between our UI and REST API.
petrikainulainen.net
Clean Test Automation Monthly 8 / 2025 - Petri Kainulainen
The clean test automation monthly highlights 15 interesting or useful test automation blog posts which I read during august 2025.
000
Petri Kainulainen @petrikainulainen.bsky.social · 01/08/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.
petrikainulainen.net
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.
010
Reposted by Petri Kainulainen
Michael Simons @rotnroll666.bsky.social · 01/07/2025
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
failsafe.dev
Fault tolerance and resilience patterns for the JVM
Failsafe website
1113
Petri Kainulainen @petrikainulainen.bsky.social · 01/07/2025
Interesting article.
mbrizic.com
React Still Feels Insane And No One Is Talking About It
000
Petri Kainulainen @petrikainulainen.bsky.social · 01/07/2025
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.
000
Petri Kainulainen @petrikainulainen.bsky.social · 30/06/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.
petrikainulainen.net
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.
001
Petri Kainulainen @petrikainulainen.bsky.social · 28/06/2025
I use a somewhat similar approach.
wimdeblauwe.com
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...
011
Petri Kainulainen @petrikainulainen.bsky.social · 10/06/2025
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?
000
Petri Kainulainen @petrikainulainen.bsky.social · 10/06/2025
This is an excellent post.
020
Reposted by Petri Kainulainen
Marc Philipp @marcphilipp.de · 07/06/2025
✨ 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...
@ParameterizedClass
@ValueSource(strings = {"foo", "bar"})
class SomeTests {
    @Parameter String value;
    
    @Test
    void shouldNotBeNull() {
        assertNotNull(value);
    }
    @Test
    void lengthShouldBeThree() {
        assertEquals(3, value.length());
    }
}
03011
Reposted by Petri Kainulainen
Siva @sivalabs.in · 31/05/2025
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.
131
Petri Kainulainen @petrikainulainen.bsky.social · 31/05/2025
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.
110
Petri Kainulainen @petrikainulainen.bsky.social · 31/05/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.
petrikainulainen.net
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.
022
Petri Kainulainen @petrikainulainen.bsky.social · 26/05/2025
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...
github.com
[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...
010
Petri Kainulainen @petrikainulainen.bsky.social · 26/05/2025
Good point.
poutsma-principles.com
Fluent APIs Are More Than Just Chaining · Poutsma Principles
000
Petri Kainulainen @petrikainulainen.bsky.social · 21/05/2025
Sometimes vibe-coding is relaxing, and sometimes it's not.
000
Reposted by Petri Kainulainen
Siva @sivalabs.in · 21/05/2025
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!
github.com
GitHub - JetBrains/junie-guidelines
Contribute to JetBrains/junie-guidelines development by creating an account on GitHub.
0104
Reposted by Petri Kainulainen
Siva @sivalabs.in · 20/05/2025
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.
youtube.com
Spring JdbcClient: A better alternative to JdbcTemplate
YouTube video by IntelliJ IDEA, a JetBrains IDE
0105
Petri Kainulainen @petrikainulainen.bsky.social · 21/05/2025
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.
110
Petri Kainulainen @petrikainulainen.bsky.social · 20/05/2025
Expectations vs. Reality
000
Petri Kainulainen @petrikainulainen.bsky.social · 19/05/2025
The Efficiency Delusion
011
Petri Kainulainen @petrikainulainen.bsky.social · 15/05/2025
I find it a bit funny that Github doesn't want to train AI bots: news.ycombinator.com/item?id=4393...
news.ycombinator.com
Updated rate limits for unauthenticated requests | Hacker News
000
Petri Kainulainen @petrikainulainen.bsky.social · 13/05/2025
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.
petrikainulainen.net
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.
022
Reposted by Petri Kainulainen
Siva @sivalabs.in · 09/05/2025
When you hear "Database is just an implementation detail"...RUN.
media.tenor.com
a person is running with a skateboard in their hands
ALT: a person is running with a skateboard in their hands
122
Petri Kainulainen @petrikainulainen.bsky.social · 07/05/2025
If you always take the easiest path, you won't learn anything.
darrenhorrocks.co.uk
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...
000
Petri Kainulainen @petrikainulainen.bsky.social · 07/05/2025
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.
010
Petri Kainulainen @petrikainulainen.bsky.social · 05/05/2025
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.
text-incubation.com
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…
000
Petri Kainulainen @petrikainulainen.bsky.social · 04/05/2025
This is quite easy to do and very helpful.
dev.to
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....
000
Petri Kainulainen @petrikainulainen.bsky.social · 03/05/2025
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.
rieckpil.de
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.
010
Petri Kainulainen @petrikainulainen.bsky.social · 02/05/2025
Interesting article that describes how you can catch WCAG (accessibility) violations with Playwright and generate the a report that displays all found violations.
medium.com
Automating Accessibility Checks Using Playwright
We were tasked with introducing accessibility testing into one of our projects, and our first goal was to get a quick, high-level overview…
000
Petri Kainulainen @petrikainulainen.bsky.social · 02/05/2025
An excellent blog post which pretty much summarizes my experiences with BDD testing tools. These tools are always sold with a promise that non-technical stakeholders will now write test scenarios, but every time the end result has been the same: developers will write the same test multiple times.
linkedin.com
Cutting Through the Noise - The Case Against Gherkin in Automation
Explore why Gherkin adds unnecessary complexity to test automation and how a code-first approach enhances efficiency, maintainability, and speed in testing.
000
Petri Kainulainen @petrikainulainen.bsky.social · 01/05/2025
Highlights: why we shouldn't use Gherkin (or other BDD tools), top 5 Spring Boot testing myths debunked, and how to detect WGAC (accessibility) violations with Playwright.
petrikainulainen.net
Clean Test Automation Monthly 4 / 2025 - Petri Kainulainen
The clean test automation monthly highlights 20 interesting or useful test automation blog posts which I read during April 2025.
011
Petri Kainulainen @petrikainulainen.bsky.social · 22/04/2025
I updated my Spring MVC Test Tutorial page. I added links to my new #MockMvcTester articles.
petrikainulainen.net
Spring MVC Test Tutorial - Petri Kainulainen
My Spring MVC Test (aka MockMvc) tutorial helps you to write both unit and integration tests for Spring Boot web applications and REST APIs.
000
Reposted by Petri Kainulainen
Siva @sivalabs.in · 22/04/2025
A Practical Guide to Testing Spring Controllers With MockMvcTester blog.jetbrains.com/idea/2025/04...
blog.jetbrains.com
A Practical Guide to Testing Spring Controllers With MockMvcTester | The IntelliJ IDEA Blog
Spring Framework 6.2 introduced MockMvcTester to support writing AssertJ style assertions using AssertJ under the hood. If you’re using Spring Boot, the spring-boot-starter-test dependency transiti
174
Petri Kainulainen @petrikainulainen.bsky.social · 22/04/2025
I am currently downloading Elder Scrolls IV: Oblivion Remastered. 45 minutes to go.
000
Petri Kainulainen @petrikainulainen.bsky.social · 21/04/2025
So, if MS would have kept the original copyright notices, everything would be fine? Another thought: maybe it's a good idea to use a restrictive license if you don't want that mega corporations can fork your project.
philiplaine.com
Getting Forked by Microsoft
Three years ago, I was part of a team responsible for developing and maintaining Kubernetes clusters for end user customers. A main source for downtime in customer environments occurred when image reg...
000
Petri Kainulainen @petrikainulainen.bsky.social · 21/04/2025
The second part of my MockMvcTester tutorial identifies the tests we must write, describes how we can remove duplicate request building code from our test class, and explains how we can write unit tests for a REST API endpoint that returns a list as JSON.
petrikainulainen.net
Writing Unit Tests With MockMvcTester: Returning a List as JSON - Petri Kainulainen
This blog post describes how we can write unit tests for a Spring MVC REST API endpoint that returns a list as JSON.
000
Petri Kainulainen @petrikainulainen.bsky.social · 09/04/2025
I just happened to buy Core 2 Duo 8400 + Asus P5Q SE2 + 4GB DDR2 combo :D It was so cheap (10€) and tested => I had to pull the trigger.
010
Petri Kainulainen @petrikainulainen.bsky.social · 09/04/2025
I got a sudden urge to build a Windows XP computer for playing old games, but then I remembered that I don't have enough time to play all interesting modern games. But, building that damn thing would still be fun.
000
Reposted by Petri Kainulainen
Fran Díaz @frandayzdev.bsky.social · 07/04/2025
"devs, perhaps swayed by the convenience of annotations, might overlook thorough domain modeling necessary for maintaining business logic integrity ... while tools like Lombok can significantly reduce boilerplate, they are not substitutes for careful design and a deep understanding of the domain" 👆
001