Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JUnit Platform] Document how to run a single feature or scenario #2804

Merged
Merged
Changes from 1 commit
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
21 changes: 21 additions & 0 deletions cucumber-junit-platform-engine/README.md
mpkorstanje marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,27 @@ tasks {
}
```

### Running a single scenario or feature from the CLI

To select a single scenario or feature he `cucumber.features` property can be
used. Because this property will cause Cucumber to ignore any other selectors
from JUnit, it is prudent to execute only the Cucumber engine.

#### Maven

To select the scenario on line 10 of the `example.feature` file use:

```shell
mvn test -Dsurefire.includeJUnit5Engines=cucumber -Dcucumber.plugin=pretty -Dcucumber.features=path/to/example.feature:10
```

Note: Add `-Dcucumber.plugin=pretty` to get test reports. Maven will not
report on tests without a class.

#### Gradle

TODO: (Feel free to send a pull request. ;))

## Suites with different configurations

The JUnit Platform Suite Engine can be used to run Cucumber multiple times with
Expand Down