JUnit 5: what's new and what's coming
summary
JUnit 5 is a ground‑up rewrite providing a Platform plus test engines (Jupiter for the new programming model, Vintage for JUnit 3/4), modular Java‑8+ support, and Spring integration that enables constructor and method injection in tests. New, concrete features: non‑public test classes, lambda-based assertThrows and assertTimeoutPreemptively, rich parameterized sources and dynamic tests, parallel execution since 5.3 (example: 11 Fibonacci invocations drop from ~10s to ~4s), and a migration path via the Vintage engine. Versions 5.0→5.4 released; 5.5 work in progress.
AI-written summary · about
chapters (26)
- 0:00Intro
- 0:14Sam Brannen
- 4:55Java Versions
- 5:37IDEs and Build Tools
- 7:40More powerful Programming Model
- 8:40Example: Calculator Tests
- 9:55Timeouts
- 14:35Custom Tags
- 17:13Argument Conversion and Aggregation
- 19:41Dynamic Tests
- 22:30Configuring Parallelism (5.3)
- 23:09Execution Mode and Synchronization (5.3)
- 25:38New Extension Model
- 26:34Extension APIs - Lifecycle Callbacks
- 28:44DisplayNameGenerator (5.4)
- 30:15Conditional Test Execution
- 31:00Built-in Conditions (5.1)
- 32:22Annotations, Assertions, Assumptions
- 32:54JUnit 4 Rule Migration Support
- 33:32JUnit 4 lgnore and Assumption Support (5.4)
- 38:19Spring Support for JUnit Jupiter
- 39:19Configuring JUnit Jupiter with Spring
- 39:59Automatic Test Constructor Autowiring (5.2)
- 40:55Spring Boot 2.1 & JUnit Jupiter - Custom Config
- 41:51Spring Boot 2.1 & JUnit Jupiter - MockMvc Test
- 42:33Tip: Upgrading JUnit 5 Version in Spring Boot
related talks
51mJUnit 5 — The New Testing Framework for Java and Platform for the JVM
01h 06mJUnit 5 — New Opportunities for Testing on the JVM
48mJUnit 5: New Opportunities for Testing on the JVM
59mJUnit 5 - State of the Union
44mJUnit 5: The Next Step in Automated Testing for Java
51mWelcome to JUnit 5
51mJUnit 5
07mJUnit 5
