-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
I tried this sbt plugin with cucumber for JUnit5. It uses the JUnit Suite Engine for configuration.
I use these libraries:
libraryDependencies += "io.cucumber" %% "cucumber-scala" % "8.26.1" % Test
libraryDependencies += "io.cucumber" % "cucumber-junit-platform-engine" % "7.21.1" % Test
libraryDependencies += "org.junit.platform" % "junit-platform-suite" % "1.11.4" % Test
libraryDependencies += "org.junit.jupiter" % "junit-jupiter-api" % "5.11.4" % Test
libraryDependencies += "com.github.sbt.junit" % "jupiter-interface" % "0.13.3" % Test
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
and this configuration:
package steps
import org.junit.platform.suite.api.{SelectPackages, Suite}
import org.junit.platform.suite.api.SelectClasspathResource
@Suite
@SelectClasspathResource("features/example.feature")
class RunCucumberTest
The output is:
org.junit.platform.commons.JUnitException: TestEngine with ID 'cucumber' failed to discover tests
Caused by: org.junit.platform.commons.PreconditionViolationException: Could not load class with name: Example feature
....
[info] Test run started (JUnit Platform Suite)
[info] Test classpath:features/example.feature 3 started
[info] Given step executed
[info] When step executed
[info] Then step executed
[info] Test run finished: 0 failed, 0 ignored, 1 total, 0.146s
I suspect that this plugin somehow executes the TestEngine twice. Once without my configuration (which fails) and once with (which succeeds). Although, I am not deep enough into the topic to say with certainty. Is this a bug / missing feature of this plugin, or did I misconfigure something?
I have created a minimal repo for reproduction:
https://github.com/Leon0402/Cucumber-Scala-with-JUnit5
Thank you!
steffanschlein, mpkorstanje and gaeljw
Metadata
Metadata
Assignees
Labels
No labels