Skip to content

Not working with junit-jupiter 6+ (new release) #1588

Description

@jehon

When running with junit-jupiter version 6+, the plugin complain:

'org.junit.platform.commons.annotation.Testable' on project build path. JUnit 5 tests can only be run if JUnit 5 is on the build path.

pom dependency:

	<dependency>
		<groupId>org.junit.jupiter</groupId>
		<artifactId>junit-jupiter</artifactId>
		<version>6.0.1</version>
		<scope>test</scope>
	</dependency>

I am not surprised, but I think we could make it work.

Activity

  1. github-actions commented on Nov 24, 2025

    @github-actions

    Hi Jean Honlet (@jehon), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

    • Add explicit JUnit Platform modules so the Testable annotation is on the classpath:
      <dependency>
        <groupId>org.junit.platform</groupId>
        <artifactId>junit-platform-commons</artifactId>
        <version>1.10.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>6.0.1</version>
        <scope>test</scope>
      </dependency>
    • Downgrade to JUnit 5 (for example, 5.10.2) until the Java Test Runner extension adds JUnit 6 support.
    • File a feature request in the Java Test Runner repo to support JUnit 6.

    Other references with high confidence:

    • JUnit 5 from Eclipse Project not working: invalid classpath container prevents running tests (#1467)
    Other references with low confidence
    • Start VSCode after upgrading from junit4 to junit5 – similar BuildPathSupport error when plugin detects JUnit 5 on the classpath (#703)

    The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

  2. jehon commented on Nov 24, 2025

    @jehon
    Author

    Hello dear AI assistant,

    Downgrading to 5 does work indeed.

    But I would like to support 6.

  3. wenytang-ms commented on Dec 10, 2025

    @wenytang-ms
    Contributor

    Jean Honlet (@jehon) can you share about your project, actually we support junit 6 on the latest vscode-java-test prerelease version [0.43.2025120408]
    can you help verify such issue can work with the latest prerelease java-test extension?

  4. github-actions commented on Dec 26, 2025

    @github-actions

    This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.

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