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:

Image with slug junit-5-setup
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.
Image with slug junit-5-basics
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.
Image with slug junit-5-disabled-conditions
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.
Image with slug junit-5-parameterized-tests
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:

Image with slug talk-junit-pioneer
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.
Image with slug junit-pioneer-1-0-0
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
Image with slug junit-5-architecture-jupiter
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).
Image with slug junit-5-extension-model
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.
Image with slug junit-5-dynamic-tests
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.
Image with slug junit-5-parameterized-tests-nighthacking
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
Image with slug junit-5-rewrite-architecture-extensions
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?
Image with slug talk-junit-5
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.
Image with slug junit-lambda-prototype
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.