Skip to content

SYSTEM Cited by 1 source

JUnit 5

JUnit 5 (aka JUnit Jupiter) is the current generation of the JVM's standard-library test framework, released 2017. It replaced JUnit 4's single-runner model with a modular architecture: the Jupiter engine (new programming model), the Vintage engine (JUnit 4 compatibility), and Platform (runner / discovery APIs, used by Surefire, Failsafe, Gradle, IDEs).

Key primitives: @Test, @BeforeEach / @AfterEach, @BeforeAll / @AfterAll, @ParameterizedTest, @Nested, @DisplayName, @Tag, extension model via @ExtendWith(...Extension.class).

Relevance to Testcontainers ingest

  • Testcontainers ships a junit-jupiter Maven module that adds @Testcontainers (class-level) and @Container (field-level) annotations for declarative container lifecycle per test class. Zalando ZMS uses this alongside the AbstractIntegrationTest base-class idiom (patterns/shared-static-container-across-tests).
  • The per-class annotation model has documented limits: containers cannot be shared between test classes and the extension "has only been tested with sequential test execution" — the reason many teams prefer the static-field pattern over @Container.

Seen in

Last updated · 476 distilled / 1,218 read