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) *

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