You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to pass properties to cucumber using CLI arguments in a property. E.g.
mvn clean test -Dcucumber.options="--strict --monochrome"
This is rather complicate, esp when multiple layers are involved and qoutes get confusing (e.x: #1596).
mvn clean test -Dcucumber.options='--strict --monochrome --tags "not @ignored"'
A better way to do this would be to provide each option individually:
mvn clean test -Dcucumber.strict=true -Dcucumber.monochrome=true -Dcucumber.tags="not @ignored"
Once this is available we deprecate cucumber.options.
Possible Solution
In develop-v5 the CucumberPropertiesParser.parse method is provided with a map containing properties from either either a cucumber.properties file, environment variables, or system properties.
After parsing cucumber.options an options builder is created. When a property is present the builder can be used to set the matching option to the right value.
Supported properties:
cucumber.glue=<separated list of paths> #using OS appropriate seperator
cucumber.features=<separated list of paths> #using OS appropriate seperator
cucumber.tags=<single tag expression>
cucumber.name=<regex>
cucumber.ansi-colors.disabled=<boolean>
cucumber.execution.dry-run=<boolean>
cucumber.execution.strict=<boolean>
cucumber.execution.parallel.config.fixed.parallelism=<int>
cucumber.execution.limit=<positive integer>
cucumber.execution.order=<reverse|random|random:seed>
cucumber.snippet-type=<underscore|camelcase>
cucumber.wip=<boolean>
Adds properties for all CLI options. Removes the ability to load rerun files
from the class-path. There appears to be no use case and it significantly
simplifies the implementation.
## Details
Adds:
```
cucumber.ansi-colors.disabled
cucumber.execution.dry-run
cucumber.execution.limit
cucumber.execution.order
cucumber.execution.parallel.config.fixed.parallelism
cucumber.execution.strict
cucumber.execution.wip
cucumber.feature
cucumber.rerun-file
cucumber.filter.name
cucumber.filter.tags
cucumber.glue
cucumber.object-factory
cucumber.plugin
cucumber.snippet-type
```
## Motivation and Context
It is possible to pass properties to cucumber using CLI arguments in a property.
E.g:
```
mvn clean test -Dcucumber.options="--strict --monochrome"
```
This is rather complicate, esp when multiple layers are involved and quotes get
confusing (e.x: #1596).
```
mvn clean test -Dcucumber.options='--strict --monochrome --tags "not @ignored"'
```
A better way to do this would be to provide each option individually:
```
mvn clean test -Dcucumber.strict=true -Dcucumber.ansi-colors.disabled=true -Dcucumber.filter.tags="not @ignored"
```
Closes#1675
Summary
It is possible to pass properties to cucumber using CLI arguments in a property. E.g.
This is rather complicate, esp when multiple layers are involved and qoutes get confusing (e.x: #1596).
A better way to do this would be to provide each option individually:
Once this is available we deprecate
cucumber.options
.Possible Solution
In
develop-v5
theCucumberPropertiesParser.parse
method is provided with a map containing properties from either either acucumber.properties
file, environment variables, or system properties.After parsing
cucumber.options
an options builder is created. When a property is present the builder can be used to set the matching option to the right value.Supported properties:
Property names where possible should match those used by JUnit 5: https://github.com/cucumber/cucumber-jvm/blob/junit-jupiter/junit-platform-engine/src/main/java/io/cucucumber/jupiter/engine/Constants.java
To document this properly with Java doc please take hints from:
https://junit.org/junit5/docs/current/api/constant-values.html
https://junit.org/junit5/docs/current/api/org/junit/jupiter/engine/Constants.html
The text was updated successfully, but these errors were encountered: