#JUnit 5.12 will support user-defined #Java versions in condition annotations.

This is useful when running tests on a JVM not yet supported by the JRE enum constants like JAVA_26. For example:

@⁠EnabledOnJre(versions={25,26})

@⁠EnabledForJreRange(minVersion=26)

https://junit.org/junit5/docs/snapshot/user-guide/#writing-tests-conditional-execution-jre

JUnit 5 User Guide

It took +1580 lines to implement, test, and document that feature, so I hope you find it useful! 🤓

https://github.com/junit-team/junit5/commit/2d9a10eda5d94c9609df3dfdf26efcf6e34d579b

Support arbitrary Java versions with JRE conditions · junit-team/junit5@2d9a10e

Prior to JUnit Jupiter 5.12, JRE-based conditions could only rely on predefined constants in the JRE enum. Furthermore, those constants are only updated as long as the particular JUnit Jupiter bran...

GitHub