STF Milestone 1: Adopt Renovate Jan 19, 2025
This post is part of the series on my work on JUnit supported by the Sovereign Tech Fund (STF). Please refer to the initial post for context and a list of all posts.
When drafting the project description for the STF, it was important to choose something as a first milestone that I could get done in under a month and that would have a direct benefit to the project right away and improve its maintainability. That’s why I eventually decided on migrating to Renovate for automating updates to dependencies and build tools.
Being a full-time open source maintainer supported by the Sovereign Tech Fund Jan 19, 2025
The Sovereign Tech Fund (STF) is a relatively new German government initiative that aims to strengthen the open source ecosystem. It invests in “foundational technologies that enable the creation of other software”. When it was created in 2022, seven projects from a wide range of technologies received funding initially. As of today, 60 technologies have been supported with a total investment sum of 23.5 million euros.
I have been intrigued and following its work since its inception. When I left Gradle last March, I applied for funding to continue my work as a maintainer of JUnit. Due to some internal restructuring at the agency managing the program, it took a while to get through the application process. But in August 2024, I finally signed a contract with them that will allow me to focus on JUnit for about a year. I was and am still stoked, happy, and grateful for this opportunity!
JUnit 5 at Devoxx US 2017 Apr 20, 2017
A few weeks ago, I attended Devoxx US in San Jose, CA, and gave a talk about JUnit 5. The recording is now available on YouTube.
JUnit 5 M1 Jul 9, 2016
I am resurrecting this blog for a very special occasion: we, the JUnit 5 team, have released the first milestone of JUnit 5 this Thursday. A tremendous amount of work has been completed since we shipped the alpha version in February: 138 issues have been resolved, 766 commits have been pushed to master. We had fruitful discussions with many contributors and early adopters. Thanks to everyone who participated and helped to make it happen!
Hamcrest Quick Reference Jan 2, 2013
Recently, we have released JUnit 4.11 which now uses the latest version of Hamcrest (1.3). Being finally able to (easily) use the power of a recent version of the matchers that come with hamcrest-core and hamcrest-library along with JUnit, I have been looking for a decent-looking printable quick reference of available matchers. Since I wasn’t able to find any, I have decided to create my own.
Using DbUnit Without XML Mar 19, 2012
In the previous post we have seen how to use DbUnit to write a simple database test. By using DbUnit for this purpose, we were able to insert a complete dataset into the database without writing SQL. However, we had to use XML to specify the dataset:
<dataset>
<PERSON NAME="Bob" LAST_NAME="Doe" AGE="18"/>
<PERSON NAME="Alice" LAST_NAME="Foo" AGE="23"/>
<PERSON NAME="Charlie" LAST_NAME="Brown" AGE="42"/>
</dataset>
Now, you can think about XML what you want but I (and hopefully most people) would rather not want to write such files but instead create the dataset directly in the code of the test class. As it turns out, this is very hard using plain DbUnit.
Database Tests With DbUnit (Part 1) Mar 13, 2012
Inspired by a recent blog post and presentation by Jens Schauder, this blog posts starts a series of posts about using DbUnit for database and integration tests. In addition, I will talk about Database Tests with DbUnit at ObjektForum Karlsruhe in April. This first post introduces DbUnit and demonstrates how it can be used to write database tests.
Primitive Matt(ch)ers? Nov 16, 2010
The Hamcrest project provides a large number of matchers, i.e. declaratively defined predicates. Prominent uses of these matchers include testing and mocking libraries like JUnit and jMock, respectively.
One of the benefits of using assertThat()
and Hamcrest matchers is that assertions become very readable. Unfortunately, you often have to rely on a questionable Java mechanism: auto boxing/unboxing.
Combining SuiteBuilder and ClasspathSuite May 13, 2010
In a recent commit to JUnit Kent Beck and David Saff have added an “alpha-ready implementation of SuiteBuilder
”. As Kent Beck previously described in a blog post, the idea behind the SuiteBuilder
runner is to use annotations on fields instead of annotations on classes.
Applying DRY to JUnit Categories Mar 13, 2010
Long awaited, JUnit 4.8 introduced support for categorizing test cases.
A category marker is simply a class or interface, e.g.
public interface SlowTests {}
Generic Matcher Pitfalls Feb 16, 2010
Using Hamcrest matchers in combination with assertThat
allows for more fluid specification of JUnit assertions.
Recently, while working on the backend of Project Usus, we needed a simple matcher, that would test whether a given set is empty. At the time, we reused a set matcher we had already written a few minutes earlier.
Experimenting with Theories Feb 13, 2010
The very first 4.x release of JUnit contained support for custom test runners. Moreover, it came with the Parameterized
test runner that allows to execute the test cases in a test class against a collection of values, i.e. parameters.
Subscribe via RSS