JUnit 5's Best Features
summary
Walkthrough of concrete JUnit 5 features with runnable examples and a public repo: shows switching test lifecycles to per-class instantiation to avoid reinitializing state, uses assertAll runs every assertion to report multiple failures, demonstrates lazy failure-message suppliers and logger suppliers, proves assertThrows/assertDoesNotThrow and timeouts, and wires Parameterized tests with ValueSource, MethodSource, CSV/FileSource and an AggregateWith aggregator that parses CSV into Book objects. Also shows conditional OS/JRE/env execution, Vintage engine for JUnit4, Spring extension usage, and experimental parallel test execution via junit-platform.properties.
AI-written summary · about
chapters (13)
- 0:00Introduction to JUnit 5
- 4:35JUnit 5 Platform and Jupiter
- 7:03Lifecycle and Test Instance
- 10:37Custom Test Names
- 14:28Assertions in JUnit 5
- 27:43Exception Handling
- 33:05Assumptions and Preconditions
- 34:34Conditional Test Execution
- 38:50Ordered Test Execution
- 41:18Parameterized Tests
- 51:36Parallel Test Execution
- 54:05Extensions in JUnit 5
- 56:08Summary and Q&A
related talks
51mJUnit 5: what's new and what's coming
59mJUnit 5 - State of the Union
48mJUnit 5: New Opportunities for Testing on the JVM
01h 06mJUnit 5 — New Opportunities for Testing on the JVM
51mJUnit 5
51mWelcome to JUnit 5
48mDeep Dive into JUnit 5
51mJUnit 5 — The New Testing Framework for Java and Platform for the JVM
