JUnit 5: Overview & New Features
summary
Overview lists concrete changes: JUnit 5 requires Java 8 and ships modularly with a vintage engine runs JUnit 4 tests so existing suites still execute. Annotations move packages and allow non-public tests, @DisplayName accepts Unicode/emoji, @Nested groups tests. New Extension API replaces Rules/Runners with extension points like TestInstancePostProcessor and ParameterResolver; dynamic tests, repeated tests, and parameterized tests live in junit-jupiter-params; assertions add assertAll and improved assertTimeout/assertThrows that return the thrown exception.
AI-written summary · about
chapters (25)
- 0:00Introduction to JUnit 5
- 1:07JUnit 5 release status
- 2:14Requirements and installation
- 3:39New annotations overview
- 5:01Testing non-public methods
- 6:48Interface contracts testing
- 7:09Tagging tests with @Tag
- 8:11Custom test display names
- 9:15Nested test groups
- 11:23JUnit 5 extension model
- 13:52Extension points explained
- 16:04Dynamic tests
- 18:10Repeated and parameterized tests
- 20:36Parameterized tests deep dive
- 23:47Custom argument sources
- 24:49Type conversion in tests
- 25:34Test naming templates
- 26:19Conditional test execution
- 27:04New assertion features
- 28:26Timeout and exception checks
- 30:11Migration from JUnit 4
- 31:16Modular architecture
- 32:41Summary and key benefits
- 33:21Resources and next steps
- 34:26Q&A session
