📄️ Migrate to JUnit 5
JUnit 5 (also known as JUnit Jupiter) was released in 2017 and introduced significant improvements over JUnit 4.
📄️ Migrate to JUnit 6
JUnit 6 was released in 2025. The main change is a baseline requirement of Java 17, which affects tests using conditional execution annotations like @EnabledOnJre and @DisabledOnJre.
📄️ JUnit Jupiter best practices
After migrating to JUnit 5, there are several common patterns that should be cleaned up to make tests more modern and maintainable.
📄️ Nested tests
JUnit Jupiter supports nested test classes to better organize related tests and share setup code.