Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,12 @@ import org.junit.platform.suite.api._
key = Constants.GLUE_PROPERTY_NAME,
value = "cucumber.examples.scalacalculator"
)
@ConfigurationParameter(key = Constants.PLUGIN_PROPERTY_NAME, value = "pretty")
class RunCucumberTest
```

Cucumber plugins can be added in the `junit-platform.properties` file (must be in the test resources classpath,
usually `src/test/resources`):
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,
usually `src/test/resources`). For instance:
```properties
cucumber.plugin=pretty
```
Expand All @@ -116,18 +117,12 @@ cucumber.plugin=pretty
You need to enable the support of JUnit 5 in SBT:
```scala
// plugins.sbt
addSbtPlugin("com.github.sbt.junit" % "sbt-jupiter-interface" % "0.15.0")
// 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)
addSbtPlugin("com.github.sbt.junit" % "sbt-jupiter-interface" % "0.15.1")
// build.sbt
libraryDependencies += "com.github.sbt.junit" % "jupiter-interface" % JupiterKeys.jupiterVersion.value % Test
```

And, because of an [issue in the SBT integration](https://github.com/sbt/sbt-jupiter-interface/issues/142), you need to
set the following property in the `junit-platform.properties` file (must be in the test resources classpath, usually
`src/test/resources`):
```properties
cucumber.junit-platform.discovery.as-root-engine=false
```

### JUnit 4

Add the `cucumber-junit` dependency to your project.
Expand Down