Repository navigation
Not working with junit-jupiter 6+ (new release) #1588
Description
Activity
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
Testableannotation 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!
- Add explicit JUnit Platform modules so the
Hello dear AI assistant,
Downgrading to 5 does work indeed.
But I would like to support 6.
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?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.
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:
I am not surprised, but I think we could make it work.