TestNG vs JUnit 5 Battle
summary
Compares TestNG and JUnit 5 for Java testing: TestNG is more widely used and has advantages in built-in data providers and simple parallel execution but has issues with listener-order and global listener bugs; JUnit 5 offers composite annotations, parameter resolvers, many extension points (conditional disable, assertAll lambdas, no-public-required), and a JUnit 5 adapter was built for the video-recorder module, though JUnit 5 is still considered effectively beta for enterprise use.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 2:28TestNG vs JUnit popularity
- 5:19Round 1: Parameterization
- 8:10Parallel test execution
- 10:17JUnit 5 first advantage
- 12:33JUnit 5 composite annotations
- 14:18Soft assertions comparison
- 16:03Listeners and rules
- 20:21Disable conditions
- 21:46Parameter injection
- 24:16JUnit 5 extensions
- 27:07TestNG problems
- 33:57Build tools support
- 36:45Code comparison JUnit vs TestNG
- 38:30Parallel execution comparison
- 39:15Build tools and tags
- 40:21JUnit 5 production use
- 41:49Results and takeaways
- 43:37Q&A








