Proposal: JUnit 5 Test Engine Integration for JCStress
Vladimir Sitnikov
sitnikov.vladimir at gmail.com
Sun Jul 13 11:42:34 UTC 2025
Hi everyone,
What do you think about introducing a JUnit 5 test engine implementation
for JCStress?
Currently, integrating JCStress tests into a Gradle-based project isn't
very intuitive.
JCStress tests don’t resemble regular tests, and IDEs don’t offer UI
support for running individual test classes.
That can make the development workflow less smooth than it could be.
The JUnit 5 platform was designed to decouple test discovery and execution
from the test API,
allowing different kinds of tests to run under a unified infrastructure.
A custom JCStress engine for the JUnit platform would enable more seamless
integration with Gradle’s test tasks,
and IDEs would treat JCStress tests more like regular ones — including
class-level run buttons and test output integration.
Additionally, applying the @Testable annotation on top of @JCStressTest
could allow IDEs to recognize and expose UI
affordances for running individual JCStress tests, making experimentation
and debugging easier.
I’m not suggesting adding a direct JUnit 5 dependency to JCStress core
itself — that might introduce unnecessary coupling.
But maybe a separate module (e.g., jcstress-junit-engine) could provide the
bridge.
Would that be something the community is open to?
Some related references:
* JUnit 5 custom test engines:
https://docs.junit.org/current/user-guide/#test-engines-custom
* Known third-party engines:
https://github.com/junit-team/junit-framework/wiki/Third-party-Extensions#junit-platform-test-engines
* @Testable annotation:
https://github.com/junit-team/junit-framework/blob/d2d9987282c39e047a6d1137613eaf2750b1aad7/junit-platform-commons/src/main/java/org/junit/platform/commons/annotation/Testable.java
Looking forward to hearing your thoughts.
Best regards,
Vladimir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jcstress-dev/attachments/20250713/9090735e/attachment.htm>
More information about the jcstress-dev
mailing list