Everything about

#junit‑5

An introductory series about JUnit 5 plus a few articles that dive deeper, teaching you all you need to know about Java's most ubiquitous library.

Introduction

I wrote a series of posts that introduce you to JUnit 5 and I recommend you read them in following order:

JUnit 5 Setup in IntelliJ, Eclipse, Maven, and Gradle#post#tools #junit‑5 #libraries #testing
How to set up JUnit 5 so tests run in IntelliJ, Eclipse, Maven, Gradle or, if all else fails, via JUnit 4 or on the command line.
JUnit 5 Basics: @Test, Lifecycle, Assertions, Assumptions, And More#post#java‑basics #junit‑5 #libraries #testing
The Basics of JUnit 5: How to use @Test, @BeforeAll, @BeforeEach, @AfterEach, @AfterAll, assertions, and assumptions. How to disable, name, and tag tests.
JUnit 5 Conditions: @Enabled, @Disabled, Customized#post#junit‑5 #libraries #testing
A detailed look at JUnit 5's @Disabled, @DisabledOnOs, @DisabledOnJre, etc. and how to create custom conditions to flexibly disable test methods.
JUnit 5 - Parameterized Tests#post#junit‑5 #libraries #testing
Thorough introduction to parameterized tests in JUnit 5 with @ParameterizedTest, argument sources (eg @MethodSource, @CsvSource), and argument converters.

Diving Deeper

Then there are a few more posts on the topic that can be read in pretty much any order:

To Jupiter And Beyond - On An Exploratory Mission With JUnit Pioneer#talk#junit‑pioneer #junit‑5 #community #documentation #tools
JUnit Pioneer gathers JUnit 5 extensions. This talk discusses the technical aspects, but also the mission, dev practices, automatic releases, and what Twitch has to do with all of this.
JUnit Pioneer 1.0#post#junit‑pioneer #junit‑5 #testing
Yesterday we released JUnit Pioneer 1.0 🥳 - here's a quick rundown of its features
JUnit 5 Architecture or "What's Jupiter?"#post#architecture #junit‑5 #libraries #testing
The JUnit 5 architecture promotes a better separation of concerns than JUnit 4 did. It also provides clear APIs for testers (Jupiter) and tools (Platform).
JUnit 5 - Dynamic Tests#post#junit‑5 #lambda #libraries #testing
With JUnit 5's dynamic tests, we can create tests at run time, for example to parameterize tests, create hierarchical test plans, or define tests with lambdas.
JUnit 5 Extension Model: How To Create Your Own Extensions#post#architecture #junit‑5 #libraries #testing
The JUnit 5 extension model enables detailed, flexible, and powerful additions to JUnit 5's core features. For that it provides specific extension points.
Parameterized Tests in JUnit 5#video#junit‑5
At JavaLand 2017, I spent 15 minutes exploring JUnit 5's (then) brand-new parameterized test feature in a NightHacking session
Rewrite, Architecture, Extensions Of JUnit 5#video#community #junit‑5
What were the reasons for the rewrite? How does JUnit 5 compare to JUnit 4? What's so special about the architecture and the extension points?
JUnit 5#talk#junit‑5 #testing
In this talk, I introduce JUnit 5 from basic tests to more advanced features like nesting, parameterization, parallelization, and extensions. We also discuss its architecture and compatibility with JUnit 4.
JUnit Lambda - The Prototype#post#junit‑5 #libraries #testing
JUnit Lambda will eventually bring us JUnit 5. This is a discussion of the recent prototype, its features, core principles and compatibility considerations.