You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "sbglasius (via GitHub)" <gi...@apache.org> on 2026/09/01 14:22:18 UTC
[I] Jupiter engine is not on the test runtime classpath by convention, so a module can silently run zero tests [grails-core]
sbglasius opened a new issue, #16289:
URL: https://github.com/apache/grails-core/issues/16289
Split out from review discussion on https://github.com/apache/grails-core/pull/16281.
## Problem
`gradle/test-config.gradle` adds `testRuntimeOnly 'org.junit.platform:junit-platform-launcher'` and calls `useJUnitPlatform()`, but never adds `org.junit.jupiter:junit-jupiter-engine`.
Without the engine on the test runtime classpath, JUnit 5 tests are not discovered — and the build does not fail. The test task reports `BUILD SUCCESSFUL` while executing zero tests.
This was found in `grails-gsp/grails-taglib`, whose only JUnit 5 test (`GroovyPageAttributesTests`) had never executed. Reverting just the one-line engine addition in that module reproduces it: `:grails-taglib:test` succeeds and discovers nothing.
## Why it usually works
Every other module with JUnit 5 tests receives the engine only *transitively*, via `runtimeOnly 'org.junit.jupiter:junit-jupiter-engine'` in `grails-testing-support-core`. The six modules that declare `junit-jupiter-api` without an explicit engine all resolve it that way today. If that transitive edge is ever narrowed, the same silent-skip returns in those modules with a green build.
## Suggested fix
Add the Jupiter engine to the `gradle/test-config.gradle` convention alongside the platform launcher, so no module can silently skip its JUnit 5 tests, and drop the now-redundant module-local declaration in `grails-gsp/grails-taglib/build.gradle`.
Worth considering alongside this: a guard that fails the build when a test task discovers zero tests in a module that has test sources, so this class of problem cannot be green again.
The module-local fix landed in #16281 to unblock that PR; this issue tracks the convention-level fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Jupiter engine is not on the test runtime classpath by convention, so a module can silently run zero tests [grails-core]
Posted by "matrei (via GitHub)" <gi...@apache.org>.
matrei commented on issue #16289:
URL: https://github.com/apache/grails-core/issues/16289#issuecomment-5497033977
> @matrei given that the behavior is a silent failure, why aren't we exporting this with an api dependency in our grails-testing-support-core module?
Because we should be using Spock? 😄Also, it's a runtime dependency so I don't think API would be the right scope.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Jupiter engine is not on the test runtime classpath by convention, so a module can silently run zero tests [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on issue #16289:
URL: https://github.com/apache/grails-core/issues/16289#issuecomment-5499082710
@matrei have we eliminated all junit 5 tests in core yet? I thought we still had some.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Jupiter engine is not on the test runtime classpath by convention, so a module can silently run zero tests [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on issue #16289:
URL: https://github.com/apache/grails-core/issues/16289#issuecomment-5496939933
@matrei given that the behavior is a silent failure, why aren't we exporting this with an api dependency in our grails-testing-support-core module?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Jupiter engine is not on the test runtime classpath by convention, so a module can silently run zero tests [grails-core]
Posted by "matrei (via GitHub)" <gi...@apache.org>.
matrei commented on issue #16289:
URL: https://github.com/apache/grails-core/issues/16289#issuecomment-5499190223
> @matrei have we eliminated all junit 5 tests in core yet? I thought we still had some.
@jdaugherty I don't think we have eliminated them. The projects that have them should explicitly declare the engine as testRuntimeOnly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Jupiter engine is not on the test runtime classpath by convention, so a module can silently run zero tests [grails-core]
Posted by "matrei (via GitHub)" <gi...@apache.org>.
matrei commented on issue #16289:
URL: https://github.com/apache/grails-core/issues/16289#issuecomment-5505569921
@jdaugherty Or, perhaps the better way when using JUnit tests is to use the Jupiter aggregate artifact:
`testImplementation 'org.junit.jupiter:junit-jupiter'`
https://central.sonatype.com/artifact/org.junit.jupiter/junit-jupiter/6.1.3/dependencies
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org