Skip to content

[Enhancement]: Add support for JUnit 6.x and aligned JUnit Platform versions #11248

Closed as not planned

Description

@adamklinkosz

Module

Core

Proposal

With the release of JUnit 6.0, the JUnit team introduced a new versioning scheme:

all modules of JUnit Platform, Jupiter, and Vintage now use the same version number: 6.0.0.

source

Currently, the junit-jupiter integration in Testcontainers still depends on JUnit Platform 1.x and Jupiter 5.x, creating a scenario where mixing with JUnit 6.x causes runtime failures (e.g., NoClassDefFoundError) due to mismatched versions.

Request

  • Provide explicit support for JUnit 6.x: Platform 6.x + Jupiter 6.x.
  • Ensure all Testcontainers test-integration modules align to that version scheme.
  • Either release a dedicated testcontainers-junit-jupiter-6 variant or upgrade the existing module to JUnit 6 compatibility.

Goal

  • Allow projects upgrading to JUnit 6.0 to use Testcontainers seamlessly without forcing a fallback to Platform 1.x or Jupiter 5.x.

More info

  • Currently used Testcontainers version: 1.21.3 2.0.2

Activity

  1. eddumelendez commented on Nov 25, 2025

    @eddumelendez
    Member

    can you share the Testcontainers version you are using, please?

  2. adamklinkosz commented on Nov 25, 2025

    @adamklinkosz
    Author

    can you share the Testcontainers version you are using, please?

    Updated the desc to include the version -> 2.0.2

  3. eddumelendez commented on Nov 25, 2025

    @eddumelendez
    Member

    Testcontainers doesn't have a transitive dependency on JUnit and works well with JUnit 6.x. I have a whole repository using spring boot 4.x and JUnit 6. Can you please clarify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions