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?