← Back to libraryQuestion 282 of 468
🔬TestNG & JUnitIntermediate

JUnit 5 Architecture — Platform, Jupiter, Vintage

📌 Definition:

JUnit 5 is a modular framework of three parts: the Platform (launches tests and provides the engine API/tooling), Jupiter (the new programming/extension model — @Test, assertions, extensions), and Vintage (runs legacy JUnit 3/4 tests).

📖 Detailed Explanation:

JUnit Platform is the foundation that build tools and IDEs use to discover and run tests via TestEngines. Jupiter is the modern API you write against (new annotations, assertions, @ExtendWith extensions). Vintage is a TestEngine that runs old JUnit 4/3 tests on the Platform, enabling gradual migration. This decoupling means other frameworks can build engines on the Platform, and teams can mix legacy and new tests during migration. Understanding the split clarifies dependencies (junit-jupiter-api, junit-jupiter-engine, junit-vintage-engine) and why JUnit 5 is more extensible than JUnit 4's monolith.

🔑 Key Points:
  • Platform: launches tests, TestEngine API, tool/IDE integration
  • Jupiter: the new API (annotations, assertions, extensions)
  • Vintage: runs legacy JUnit 3/4 tests on the Platform
  • Modular design enables extensibility + gradual migration
🌍 Real-World Example:

A team migrating from JUnit 4 adds junit-vintage-engine so old @RunWith tests keep running while new tests use Jupiter (@ExtendWith), migrating incrementally on the same Platform.

🎯 Scenario-Based Interview Question:

What are the three main components of JUnit 5 and why does the split matter?