JUnit: time to shift into 5th gear!
summary
JUnit 5 splits the framework into JUnit Vintage, JUnit Jupiter and the JUnit Platform, requires Surefire >= 2.22, and runs JUnit 4 tests via Vintage so migration can be incremental. New APIs include BeforeAll/BeforeEach, assertThrows and assertAll for multiple failures, test interfaces with default methods for reusable equality checks, built‑in parameterized tests using ValueSource/CsvSource/MethodSource (Stream<Arguments>), nested tests and display name generation, extensions and a parameter resolver API (registerable globally via META-INF) and @Order/TestMethodOrder for orchestrated integration flows.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 0:15JUnit 5 Dependencies
- 3:42Migrating Test Annotations
- 5:57Advanced Assertions
- 9:31Testing on Interfaces
- 13:21Parameterized Tests
- 20:51JUnit 4 Parameterized Migration
- 24:29Spring Extensions
- 28:35Integration Test Ordering
- 33:49Parameter Resolvers
- 44:06Advanced Extensions & Summary
- 46:29Q&A Session
related talks
51mJUnit 5 — The New Testing Framework for Java and Platform for the JVM
44mJUnit 5: The Next Step in Automated Testing for Java
48mJUnit 5: New Opportunities for Testing on the JVM
01h 06mJUnit 5 — New Opportunities for Testing on the JVM
51mWelcome to JUnit 5
07mJUnit 5
01h 05mJava Testing Part 1: JUnit Jupiter and AssertJ
59mJUnit 5 - State of the Union
