File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,12 @@ import org.junit.platform.suite.api._
102102 key = Constants .GLUE_PROPERTY_NAME ,
103103 value = " cucumber.examples.scalacalculator"
104104)
105+ @ ConfigurationParameter (key = Constants .PLUGIN_PROPERTY_NAME , value = " pretty" )
105106class RunCucumberTest
106107```
107108
108- Cucumber plugins can be added in the ` junit-platform.properties ` file (must be in the test resources classpath,
109- usually ` src/test/resources ` ):
109+ Some properties can also be applied for all suites by adding them in the ` junit-platform.properties ` file (must be in the test resources classpath,
110+ usually ` src/test/resources ` ). For instance :
110111``` properties
111112cucumber.plugin =pretty
112113```
@@ -116,18 +117,12 @@ cucumber.plugin=pretty
116117You need to enable the support of JUnit 5 in SBT:
117118``` scala
118119// plugins.sbt
119- addSbtPlugin(" com.github.sbt.junit" % " sbt-jupiter-interface" % " 0.15.0" )
120+ // version 0.15.1+ is important, earlier versions have a bug preventing properly running Cucumber tests (https://github.com/sbt/sbt-jupiter-interface/issues/142)
121+ addSbtPlugin(" com.github.sbt.junit" % " sbt-jupiter-interface" % " 0.15.1" )
120122// build.sbt
121123libraryDependencies += " com.github.sbt.junit" % " jupiter-interface" % JupiterKeys .jupiterVersion.value % Test
122124```
123125
124- And, because of an [ issue in the SBT integration] ( https://github.com/sbt/sbt-jupiter-interface/issues/142 ) , you need to
125- set the following property in the ` junit-platform.properties ` file (must be in the test resources classpath, usually
126- ` src/test/resources ` ):
127- ``` properties
128- cucumber.junit-platform.discovery.as-root-engine =false
129- ```
130-
131126### JUnit 4
132127
133128Add the ` cucumber-junit ` dependency to your project.
You can’t perform that action at this time.
0 commit comments