Selecting a single test with Cucumber JUnit5 engine fails

Consider this simple project: https://github.com/ekalin/cucumber-junit5-gradle . It contains a Cucumber feature, using JUnit5.

Following the instruction from https://github.com/cucumber/cucumber-jvm/tree/master/junit-platform-engine , I’ve created a class anotated with @Cucumber so that tests can be discovered. And when I run ./gradlew test, the feature is discovered and run.

But if I try to select only that test with ./gradlew test --tests cucumber.junit5.gradle.SampleSteps (or with other ways to select the test), I get this error:

Execution failed for task ':test'.
> No tests found for given includes: [cucumber.junit5.gradle.SampleSteps](--tests filter)

I’ve tried adding includeEngines("cucumber") to useJUnitPlatform but it didn’t make any difference.

Is there some configuration to allow selecting a single test when it’s using a different engine?

Same problem. Is there any way to solve it? Gradle 6.3. Also also 5.2.1 version tried

Testing started at 0:28 …

Task :cleanTest
Task :compileJava UP-TO-DATE
Task :processResources NO-SOURCE
Task :classes UP-TO-DATE
Task :compileTestJava
Task :processTestResources NO-SOURCE
Task :testClasses
Task :test FAILED
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:test’.

No tests found for given includes: [Tests\tttt\solveTests.class](include rules) *

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  • Get more help at https://help.gradle.org
    Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
    Use ‘–warning-mode all’ to show the individual deprecation warnings.
    See Command-Line Interface
    BUILD FAILED in 528ms
    4 actionable tasks: 3 executed, 1 up-to-date

BUT
if move test from package “Tests” to green “java” folder it works correctly