A hands-on exploration of the JUnit Lambda prototype (the precursor to JUnit 5), covering new and changed features including renamed lifecycle annotations (@BeforeEach, @AfterEach, @BeforeAll, @AfterAll), improved assertions with lazy messages and grouped assertions, relaxed visibility requirements, per-class test lifecycles, native support for nested test classes via @Nested, custom annotations with meta-annotation support, conditional test execution, and parameter injection via MethodParameterResolver. The post also touches on JUnit 4 backward compatibility and migration path considerations. Note: this is a historical artifact; the released JUnit 5 differs from this prototype.

14m read timeFrom nipafx.dev
Post cover image
Table of contents
▚ Background▚ Features▚ Misc▚ Reflection

Sort: