Skip to content

Commit

Permalink
Update cucumber.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaleo authored Nov 10, 2023
1 parent 94030ac commit 1ee2299
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions docs/guide/cucumber.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# Running Cucumber scenarios with Serenity

To run Cucumber scenarios with Serenity, you need to create a Junit 4 test runner class and use `@RunWith` annotation in with the `CucumberWithSerenity` class, like this:
To run Cucumber scenarios with Serenity, you need to create a Junit 5 test runner class like this:

```java
import io.cucumber.junit.CucumberOptions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
import org.junit.runner.RunWith;

@RunWith(CucumberWithSerenity.class)
@CucumberOptions(
plugin = {"pretty"},
features = "src/test/resources/features"
)
public class AcceptanceTestSuite {}
import org.junit.platform.suite.api.IncludeEngines;
import org.junit.platform.suite.api.SelectClasspathResource;
import org.junit.platform.suite.api.Suite;

@Suite
@IncludeEngines("cucumber")
@SelectClasspathResource("/features")
public class CucumberTestSuite {}
```

Note that you need to specify at least the `features` attribute, to define the directory containing your feature files.
Expand Down

0 comments on commit 1ee2299

Please sign in to comment.