You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MethodSource is supposed to contain the declaring class, hence "source", and was introduced to allow IDE navigation. The filtering code could check for the parent descriptor's ClassSource in this case instead of using the MethodSource's class name.
The filtering code that probably needs to be changed is in Gradle, not JUnit Platform. Would you mind opening a Gradle issue instead?
This issue is came up in spockframework/spock#1235, according to @marcphilipp in junit-team/junit5#2476 the issue is in gradle itself.
Expected Behavior
With the old JUnit, i.e. non
useJUnitPlatform()
, it is possible to run:./gradlew test --tests *ChildSpec.parent -Pspock1
to execute an inherited test.
(See spockframework/spock#1235 for a demo project)
Current Behavior
With the JUnitPlatform and Spock 2 the same command does not execute a test.
./gradlew test --tests *ChildSpec.parent
Context
My guess is that it is probably that line here
return matcher.matchesTest(methodSource.getClassName(), methodSource.getMethodName());
gradle/subprojects/testing-junit-platform/src/main/java/org/gradle/api/internal/tasks/testing/junitplatform/JUnitPlatformTestClassProcessor.java
Line 179 in 46d60a4
Comment by @marcphilipp
Steps to Reproduce
See spockframework/spock#1235 for a demo project
The text was updated successfully, but these errors were encountered: