O'Reilly logo

Mastering Software Testing with JUnit 5 by Boni García

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modularity

First of all, JUnit 4 is not modular. As depicted in the following picture, the architecture of JUnit 4 is completely monolithic. All the capabilities of JUnit 4 are provided by the junit.jar dependency. As a result, different test mechanisms, such as test discovery and execution, are tightly coupled in JUnit 4.

The JUnit 4 Architecture

Johannes Link, one of the JUnit 5 core team members, summarizes this problem in an interview for Jax magazine on August 13, 2015 (during the inception of JUnit 5):

The success of JUnit as a platform prevents the development of JUnit as a test tool. The basic problem we want to solve is executing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required