I wrote a series of posts that introduce you to JUnit 5 and I recommend you read them in following order:
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.
@Test, Lifecycle, Assertions, Assumptions, And More#post
The Basics of JUnit 5: How to use
@AfterAll, assertions, and assumptions. How to disable, name, and tag tests.
A detailed look at JUnit 5's
@DisabledOnJre, etc. and how to create custom conditions to flexibly disable test methods.
Then there are a few more posts on the topic that can be read in pretty much any order:
Yesterday we released JUnit Pioneer 1.0 🥳 - here's a quick rundown of its features
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).
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.
The JUnit 5 extension model enables detailed, flexible, and powerful additions to JUnit 5's core features. For that it provides specific extension points.
A 1-day course introducing JUnit 5's full feature set (including nesting, parameterization, parallelization, and more) and powerful extension mechanism, also addressing its interaction with and migration from JUnit 4
At JavaLand 2017, I spent 15 minutes exploring JUnit 5's (then) brand-new parameterized test feature in a NightHacking session
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?
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.