testing

A collection of 15 posts

A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Oct 19, 2025 testing

Testing the untestable

I’m currently working on a software designed more than a decade ago. It offers a plugin architecture: you can develop a plugin whose lifecycle is handled by the software. The tough part, though, is how you access the platform capabilities: via static methods on singletons. @Override public boolean start() { var aService = AService.getInstance(); var anotherService = AnotherService.getInstance(); // Do something with the services var result = ...

Nicolas Fränkel
Jun 22, 2025 kotlin openrewrite testing

Testing an OpenRewrite recipe

For the last two weeks, I’ve kicked the tires of OpenRewrite. At first, I created a recipe to move Kotlin source files as per the official recommendations with a set package name. I then improved the recipe to compute the root automatically. In both versions, I thoroughly tested the recipe. However, my testing approach was wrong. In this post, I want to describe my mistakes, and how I fixed them.

Nicolas Fränkel
Feb 23, 2025 devops testing integration testing kubernetes vcluster

Pull request testing on Kubernetes: vCluster for isolation and costs control

This week’s post is the third and final in my series about running tests on Kubernetes for each pull request. In the first post, I described the app and how to test locally using Testcontainers and in a GitHub workflow. The second post focused on setting up the target environment and running end-to-end tests on Kubernetes. I concluded the latter by mentioning a significant quandary. Creating a dedicated cluster for each workflow significantly impacts the time it takes to run.

Nicolas Fränkel
Feb 16, 2025 devops testing kubernetes google cloud gke github actions vcluster

Pull Request testing on Kubernetes: working with GitHub Actions and GKE

I’m continuing my series on running the test suite for each Pull Request on Kubernetes. In the previous post, I laid the groundwork for our learning journey: I developed a basic JVM-based CRUD app, tested it locally using Testcontainers, and tested it in a GitHub workflow with a GitHub service container. This week, I will raise the ante to run the end-to-end test in the target Kubernetes environment.

Nicolas Fränkel
Feb 9, 2025 devops testing unit testing integration testing flyway spring boot github actions

Pull request testing on Kubernetes: testing locally and on GitHub workflows

Imagine an organization with the following practices: Commits code on GitHubRuns its CI/CD pipelines with GitHub ActionsRuns its production workload on KubernetesUses Google Cloud A new engineer manager arrives and asks for the following: On every PR, run integration tests in a Kubernetes cluster similar to the production one. It sounds reasonable.

Nicolas Fränkel
Oct 9, 2022 rust testing dependency injection

Different test scopes in Rust

I’m still working on learning Rust. Beyond syntax, learning a language requires familiarizing oneself with its idioms and ecosystem. I’m at a point where I want to explore testing in Rust. The initial problem We have used Dependency Injection a lot - for ages on the JVM. Even if you’re not using a framework, Dependency Injection helps decouple components. Here’s a basic example: class Car(private val engine: Engine) { fun start() { engine.

Nicolas Fränkel
Sep 19, 2021 testing testng junit comparison

Reassessing TestNG vs. Junit

In my latest blog post, I advised reassessing one’s opinion now and then as the IT world changes fast. What was true a couple of years ago could be dead wrong nowadays, and you probably don’t want to base your decisions on outdated data. This week, I’d like to follow my advice. One of my first posts was advocating for TestNG vs. JUnit.

Nicolas Fränkel
Aug 2, 2020 testing typology unit testing integration testing

Different kinds of testing

The subject of testing is vast. It may seem simple from outside, but it’s not. For example, one may define testing as checking that the software is fit for its purpose. But it encompasses a lot more: for example, mutation testing verifies that assertions do actually assert. In this post, I’d like to touch some testing flavors, what’s their purpose and how they compare to each other. The need for testing In an ideal world, we wouldn’t need testing.

Nicolas Fränkel
Mar 31, 2019 testing assertion library software craftmanship

A comparison of assertion libraries

I was not a fan of assertions libraries at first. Whether assertions provided by the testing frameworks were enough is debatable. But those libraries provides the way to write custom assertions closer to the business language. While the intention is commendable, I always thought this path was a slippery slope. If one starts writing such custom assertions, then they need to be tested obviously. And then, when will it stop?

Nicolas Fränkel
Feb 11, 2018 blockchain ethereum testing framework truffle

Starting with Ethereum - Industrialization

This is the 5th post in the Starting Ethereum focus series. This post is part of a series dedicated on starting development with the Ethereum blockchain. Last week, we finally developed a contract providing some value in the form of a rough-around-the-edges voting application. Ethereum comes with no tools aimed at state-of-the-art software development out-of-the-box. Since this is a huge issue, there’s third-party tooling available in the form of the Truffle framework.

Nicolas Fränkel
Jan 14, 2018 testing unit testing integration testing

Unit tests vs integration tests, why the opposition?

I have devoted a significant portion of my time thinking about designing and writing tests of all kinds. I believe my perspective can bring something to the table. In the rest of this post, I’ll follow the terminology proposed in the article.

Nicolas Fränkel
May 14, 2017 code quality testing code coverage

Why are you testing your software?

15 years ago, automated tests didn’t exist in the Java ecosystem. One had to build the application and painfully test it manually by using it. I was later introduced to the practice of adding a main method to every class and putting some testing code there. That was only marginally better, as it still required to manually run the methods. Then came JUnit, the reference unit testing framework in Java which brought test execution automation.

Nicolas Fränkel
Sep 25, 2016 good practice unit testing integration testing testing

Should tests be ordered or not?

Most of our day-to-day job is learned through mentorship and experience and not based upon scientific research. Once a dogma has permeated a significant minority of practitioners, it becomes very hard to challenge it. Yet, in this post, I’ll attempt to not only challenge that sometimes tests must be ordered but prove that in different use-cases.

Nicolas Fränkel
Aug 14, 2016 testing end-to-end testing behavior-driven development selenium cucumber spring

Starting with Cucumber for end-to-end testing

This week, my team decided to create a smoke test harness around our web app to avoid the most stupid regressions. I was not in favor of that, because of my prior experience with the fragility of end-to-end testing. But since we don’t have enough testers on our team, that was the only sane thing to do.

Nicolas Fränkel
Dec 20, 2015 clean code powermock quality refactoring testing

Refactoring code for testability: an example

Working on a legacy project those last weeks gave me plenty of material to write about tests, Mockito and PowerMock. Last week, I wrote about abusing PowerMock. However, this doesn’t mean that you should never use PowerMock; only that if its usage is commonplace, it’s a code smell. In this article, I’d like to show an example how one can refactor legacy code to a more testable design with the temporary help of PowerMock.

Nicolas Fränkel
A Java geek © 2008-2026
v. bc04c88300c3ec997ce8470fbff5395dc9e518b1/13264050981
Latest Posts