Class Constants
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Property name used to disable ansi colors in the output (not supported by all terminals): "cucumber.ansi-colors.disabled"static final String
Property name used to enable dry-run: "cucumber.execution.dry-run"static final String
Property template used to describe a mapping of tags to exclusive resources: "cucumber.execution.exclusive-resources.<tag-name>.read"static final String
Property template used to describe a mapping of tags to exclusive resources: "cucumber.execution.exclusive-resources.<tag-name>.read-write"static final String
Tag replacement pattern for the exclusive resource templates: "<tag-name>"static final String
Property name used to set the executing thread for all scenarios and examples in a feature: "cucumber.execution.execution-mode.feature"static final String
Property name used to select features: "cucumber.features"static final String
Property name used to set name filter: "cucumber.filter.name"static final String
Property name used to set tag filter: "cucumber.filter.tags"static final String
Property name to set the glue path: "cucumber.glue"static final String
Property name used to configure the naming strategy of examples in case of long naming strategy: "cucumber.junit-platform.naming-strategy.long.example-name"static final String
Property name used to configure the naming strategy: "cucumber.junit-platform.naming-strategy"static final String
Property name used to configure the naming strategy of examples in case of short naming strategy: "cucumber.junit-platform.naming-strategy.short.example-name"static final String
Property name to select custom object factory implementation: "cucumber.object-factory"static final String
Property name used to specify the fully qualified class name of theParallelExecutionConfigurationStrategy
to be used by theDefaultParallelExecutionConfigurationStrategy.CUSTOM
configuration strategy: "cucumber.execution.parallel.config.custom.class"static final String
Property name of the factor used to determine the desired parallelism for theDefaultParallelExecutionConfigurationStrategy.DYNAMIC
configuration strategy: "cucumber.execution.parallel.config.dynamic.factor"static final String
Property name used to determine the maximum pool size for theDefaultParallelExecutionConfigurationStrategy.FIXED
configuration strategy: "cucumber.execution.parallel.config.fixed.max-pool-size"static final String
Property name used to determine the desired parallelism for theDefaultParallelExecutionConfigurationStrategy.FIXED
configuration strategy: "cucumber.execution.parallel.config.fixed.parallelism"static final String
Property name used to determine the desired configuration strategy: "cucumber.execution.parallel.config.strategy"static final String
Property name used to enable parallel test execution: "cucumber.execution.parallel.enabled"static final String
Property name to enable plugins: "cucumber.plugin"static final String
static final String
Property name to suppress publishing advertising banner: "cucumber.publish.quiet"static final String
Property name to publish with bearer token: "cucumber.publish.token"static final String
Property name to control naming convention for generated snippets: "cucumber.snippet-type"static final String
Property name to select custom UUID generator implementation: "cucumber.uuid-generator" -
Method Summary
-
Field Details
-
ANSI_COLORS_DISABLED_PROPERTY_NAME
Property name used to disable ansi colors in the output (not supported by all terminals): "cucumber.ansi-colors.disabled"Valid values are
true
,false
.Ansi colors are enabled by default.
- See Also:
-
EXECUTION_DRY_RUN_PROPERTY_NAME
Property name used to enable dry-run: "cucumber.execution.dry-run"When using dry run Cucumber will skip execution of glue code.
Valid values are
true
,false
.By default, dry-run is disabled
- See Also:
-
EXECUTION_EXCLUSIVE_RESOURCES_TAG_TEMPLATE_VARIABLE
Tag replacement pattern for the exclusive resource templates: "<tag-name>" -
FEATURES_PROPERTY_NAME
Property name used to select features: "cucumber.features"A comma separated list of feature paths. A feature path is constructed as
[ PATH[.feature[:LINE]*] | URI[.feature[:LINE]*]
Examples:
src/test/resources/features
-- All features in thesrc/test/resources/features
directoryclasspath:com/example/application
-- All features in thecom.example.application
packagein-memory:/features
-- All features in the/features
directory on an in memory file system supported byFileSystems
src/test/resources/features/example.feature:42
-- The scenario or example at line 42 in the example feature file
Note: When used, any discovery selectors from the JUnit Platform will be ignored. This may lead to multiple executions of Cucumber. For example when used in combination with the JUnit Platform Suite Engine.
When using Cucumber through the JUnit Platform Launcher API or the JUnit Platform Suite Engine, it is recommended to either use the
DiscoverySelectors
or annotations fromorg.junit.platform.suite.api
respectively.Additionally, when this property is used, to work around limitations in Maven Surefire and Gradle, the Cucumber Engine will report its
TestSource
asCucumberTestEngine
.- See Also:
-
FILTER_NAME_PROPERTY_NAME
Property name used to set name filter: "cucumber.filter.name"Filter scenarios by name based on the provided regex pattern e.g:
^Hello (World|Cucumber)$
. Scenarios that do not match the expression are not executed.By default, all scenarios are executed
Note: To ensure consistent reports between Cucumber and JUnit 5 prefer using JUnit 5 discovery request filters,
org.junit.platform.suite.api.IncludeTags
or JUnit 5 tag expressions instead.- See Also:
-
FILTER_TAGS_PROPERTY_NAME
Property name used to set tag filter: "cucumber.filter.tags"Filter scenarios by tag based on the provided tag expression e.g:
@Cucumber and not (@Gherkin or @Zucchini)
. Scenarios that do not match the expression are not executed.By default, all scenarios are executed
Note: To ensure consistent reports between Cucumber and JUnit 5 prefer using JUnit 5 discovery request filters,
org.junit.platform.suite.api.IncludeTags
or JUnit 5 tag expressions instead.- See Also:
-
GLUE_PROPERTY_NAME
Property name to set the glue path: "cucumber.glue"A comma separated list of a classpath uri or package name e.g.:
com.example.app.steps
.- See Also:
-
JUNIT_PLATFORM_NAMING_STRATEGY_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="7.0.0") public static final String JUNIT_PLATFORM_NAMING_STRATEGY_PROPERTY_NAMEProperty name used to configure the naming strategy: "cucumber.junit-platform.naming-strategy"Value must be one of
long
orshort
. By default, short names are used.When long names are used the parent descriptor names are included into each test descriptor name. So for example a single example would be named:
Feature Name - Rule Name - Scenario Name - Examples Name - Example #N
. This is useful for tools that only report the test name such as Maven and Gradle.- See Also:
-
JUNIT_PLATFORM_SHORT_NAMING_STRATEGY_EXAMPLE_NAME_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="7.16.2") public static final String JUNIT_PLATFORM_SHORT_NAMING_STRATEGY_EXAMPLE_NAME_PROPERTY_NAMEProperty name used to configure the naming strategy of examples in case of short naming strategy: "cucumber.junit-platform.naming-strategy.short.example-name"Value must be one of
number
orpickle
. By default, numbers are used.When set to
pickle
the pickle name is used. So for scenario nameAdding <a> and <b>
and example with paramsa = 10
andb = 20
the following name would be produced:Adding 10 and 20
.Using example numbers works well in all scenarios, but if parameterized scenario names are used consistently, the pickle name provides more clarity.
- See Also:
-
JUNIT_PLATFORM_LONG_NAMING_STRATEGY_EXAMPLE_NAME_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="7.16.2") public static final String JUNIT_PLATFORM_LONG_NAMING_STRATEGY_EXAMPLE_NAME_PROPERTY_NAMEProperty name used to configure the naming strategy of examples in case of long naming strategy: "cucumber.junit-platform.naming-strategy.long.example-name"Value must be one of
number
orpickle
. By default, numbers are used.When set to
pickle
the pickle name is used. So for scenario nameAdding <a> and <b>
and example with paramsa = 10
andb = 20
the following name would be produced:Feature Name - Rule Name - Adding <a> and <b> - Examples Name - Adding 10 and 20
.Using example numbers works well in all scenarios, but if parameterized scenario names are used consistently, the pickle name provides more clarity.
- See Also:
-
PLUGIN_PROPERTY_NAME
Property name to enable plugins: "cucumber.plugin"A comma separated list of
[PLUGIN[:PATH_OR_URL]]
e.g:json:target/cucumber.json
.Built-in formatter PLUGIN types:
- html
- pretty
- progress
- summary
- json
- usage
- rerun
- junit
- testng
PLUGIN
can also be a fully qualified class name, allowing registration of 3rd party plugins.- See Also:
-
PLUGIN_PUBLISH_ENABLED_PROPERTY_NAME
- See Also:
-
PLUGIN_PUBLISH_TOKEN_PROPERTY_NAME
Property name to publish with bearer token: "cucumber.publish.token"Enabling this will publish authenticated test results online.
- See Also:
-
PLUGIN_PUBLISH_QUIET_PROPERTY_NAME
Property name to suppress publishing advertising banner: "cucumber.publish.quiet"Valid values are
true
,false
.- See Also:
-
OBJECT_FACTORY_PROPERTY_NAME
Property name to select custom object factory implementation: "cucumber.object-factory"By default, if a single object factory is available on the class path that object factory will be used.
- See Also:
-
UUID_GENERATOR_PROPERTY_NAME
Property name to select custom UUID generator implementation: "cucumber.uuid-generator"By default, if a single UUID generator is available on the class path that object factory will be used, or more than one UUID generator and the #RandomUuidGenerator are available on the classpath, the #RandomUuidGenerator will be used.
- See Also:
-
SNIPPET_TYPE_PROPERTY_NAME
Property name to control naming convention for generated snippets: "cucumber.snippet-type"Valid values are
underscore
orcamelcase
.By defaults are generated using the under score naming convention.
- See Also:
-
EXECUTION_MODE_FEATURE_PROPERTY_NAME
Property name used to set the executing thread for all scenarios and examples in a feature: "cucumber.execution.execution-mode.feature"Valid values are
same_thread
orconcurrent
. Default value isconcurrent
.When parallel execution is enabled, scenarios are executed in parallel on any available thread. setting this property to
same_thread
executes scenarios sequentially in the same thread as the parent feature. -
PARALLEL_EXECUTION_ENABLED_PROPERTY_NAME
Property name used to enable parallel test execution: "cucumber.execution.parallel.enabled"By default, tests are executed sequentially in a single thread.
- See Also:
-
EXECUTION_EXCLUSIVE_RESOURCES_READ_WRITE_TEMPLATE
Property template used to describe a mapping of tags to exclusive resources: "cucumber.execution.exclusive-resources.<tag-name>.read-write"This maps a tag to a resource with a read-write lock.
For example given these properties:
cucumber.execution.exclusive-resources.my-tag-ab-rw.read-write=resource-a,resource-b cucumber.execution.exclusive-resources.my-tag-a-r.read=resource-a
A scenario tagged with
@my-tag-ab-rw
will lock resourcea
andb
for reading and writing and will not be concurrently executed with other scenarios tagged with@my-tag-ab-rw
as well as scenarios tagged with@my-tag-a-r
. However a scenarios tagged with@my-tag-a-r
will be concurrently executed with other scenarios with the same tag. -
EXECUTION_EXCLUSIVE_RESOURCES_READ_TEMPLATE
Property template used to describe a mapping of tags to exclusive resources: "cucumber.execution.exclusive-resources.<tag-name>.read"This maps a tag to a resource with a read lock.
-
PARALLEL_CONFIG_STRATEGY_PROPERTY_NAME
Property name used to determine the desired configuration strategy: "cucumber.execution.parallel.config.strategy"Value must be one of
dynamic
,fixed
, orcustom
.- See Also:
-
PARALLEL_CONFIG_FIXED_PARALLELISM_PROPERTY_NAME
Property name used to determine the desired parallelism for theDefaultParallelExecutionConfigurationStrategy.FIXED
configuration strategy: "cucumber.execution.parallel.config.fixed.parallelism"No default value; must be an integer.
- See Also:
-
DefaultParallelExecutionConfigurationStrategy.FIXED
- Constant Field Values
-
PARALLEL_CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME
Property name used to determine the maximum pool size for theDefaultParallelExecutionConfigurationStrategy.FIXED
configuration strategy: "cucumber.execution.parallel.config.fixed.max-pool-size"Value must be an integer and greater than or equal to "cucumber.execution.parallel.config.fixed.parallelism"; defaults to
256 + fixed.parallelism
.- See Also:
-
DefaultParallelExecutionConfigurationStrategy.FIXED
- Constant Field Values
-
PARALLEL_CONFIG_DYNAMIC_FACTOR_PROPERTY_NAME
Property name of the factor used to determine the desired parallelism for theDefaultParallelExecutionConfigurationStrategy.DYNAMIC
configuration strategy: "cucumber.execution.parallel.config.dynamic.factor"Value must be a decimal number; defaults to
1
.- See Also:
-
DefaultParallelExecutionConfigurationStrategy.DYNAMIC
- Constant Field Values
-
PARALLEL_CONFIG_CUSTOM_CLASS_PROPERTY_NAME
Property name used to specify the fully qualified class name of theParallelExecutionConfigurationStrategy
to be used by theDefaultParallelExecutionConfigurationStrategy.CUSTOM
configuration strategy: "cucumber.execution.parallel.config.custom.class"- See Also:
-
DefaultParallelExecutionConfigurationStrategy.CUSTOM
- Constant Field Values
-