Thorough introduction to parameterized tests in JUnit 5: How to create them, how to name them, where to get the arguments from, and how to customize that.
JUnit 5 is the next version of Java’s most ubiquitous testing framework.
Its incremental improvements and extensible design make it a worthy successor of the battle-tested JUnit 4. But its secret power is its thoughtful architecture, which may very well redefine the future of testing on the JVM.
A series of posts covers all the details – obvious and hidden ones – of JUnit 5. If you want to learn more about the topic, you can hire me as a trainer.
We recently learned about JUnit 5’s extension model in general. Let’s now have a detailed look at custom conditions, which allow us to flexibly disable test methods.
The JUnit 5 extension model enables detailed, flexible, and powerful additions to JUnit 5’s core features. For that it provides specific extension points and easy composition of annotations.
Get to know the basics of JUnit 5: the lifecycle; how to disable, nest, and name tests; and what’s new with Assertions and Assumptions. Let’s write some tests!
See how to set up JUnit 5 Milestone 3, so you can write tests and run them with your favorite IDE and build tool.
With dynamic tests, JUnit 5 allows us to create tests at run time. With this we can more easily parameterize tests or even define them with lambdas!
JUnit 4 came in a single artifact, blending all uses cases into one bundle. The JUnit 5 architecture promotes a better separation of concerns and provides a clear API for IDEs, build tools, etc. to work with.
JUnit Lambda will eventually bring us JUnit 5. This is a discussion of the recent prototype, its features, core principles and compatibility considerations.