Replies: 2 comments 1 reply
-
|
You have configured your classpath such that feature files are present twice. Cucumber complains about this, but that complaint is swallowed due to junit-team/junit-framework#5327. Specifically the complaint is: As you can see: the features are available once by setting
It might be worth considering using JUnit Launcher API instead of the Suite Engine. It is more suited to programmatic usecases. |
Beta Was this translation helpful? Give feedback.
-
|
First of all, thanks for the elaborate reply! Features being available twice I reckon was because of Now I have to check more seriously with my coworker why I skimmed through the JUnit Launcher API docs and couldn't distill a minimal working example right away (have to admit that, as a frontend/JS dev, my experience with the JUnit universe is very thin yet). If I cannot solve that
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am tidying up an existing Java-JUnit-Cucumber-Playwright project from its convoluted (but working) setup using "Cucumber-JVM Starter: Java with Maven" as a starting point with latest versions.
From this working example I dig my way forward to get the following configuration right:
maven-failsafe-plugin(with goals being
integration-testandverify)RunCucumberIT.javainstead ofRunCucumberTest.java(to stick with failsafe's conventions)
src/maininstead ofsrc/test(reason being: our test app is an app itself with Unit tests of its own living under
src/test)@SelectPackages("io.cucumber.skeleton")as suggested in skeleton app(had been using
@SelectClasspathResourcebefore but with latest Cucumber 7.34.2 I get a non critical warning sayingWARNING: TestEngine with ID 'junit-platform-suite' encountered a non-critical issue during test discovery: (1) [WARNING] [cucumber] The classpath resource selector 'features' should not be used to select features in a package. Use the package selector with 'features' instead (via @Suite com.mycompany.RunCucumberIT).)For a fresh setup I desperately try to NOT have any warnings!)
Running
mvn verifywon't disover any tests.You can find my setup here.
What I changed: cucumber/cucumber-jvm-starter-maven-java@3e4d952
Is this expected behaviour for my current setting?
Beta Was this translation helpful? Give feedback.
All reactions