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._
102
102
key = Constants .GLUE_PROPERTY_NAME ,
103
103
value = " cucumber.examples.scalacalculator"
104
104
)
105
+ @ ConfigurationParameter (key = Constants .PLUGIN_PROPERTY_NAME , value = " pretty" )
105
106
class RunCucumberTest
106
107
```
107
108
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 :
110
111
``` properties
111
112
cucumber.plugin =pretty
112
113
```
@@ -116,18 +117,12 @@ cucumber.plugin=pretty
116
117
You need to enable the support of JUnit 5 in SBT:
117
118
``` scala
118
119
// 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" )
120
122
// build.sbt
121
123
libraryDependencies += " com.github.sbt.junit" % " jupiter-interface" % JupiterKeys .jupiterVersion.value % Test
122
124
```
123
125
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
-
131
126
### JUnit 4
132
127
133
128
Add the ` cucumber-junit ` dependency to your project.
You can’t perform that action at this time.
0 commit comments