Class Constants
- java.lang.Object
-
- io.cucumber.junit.platform.engine.Constants
-
@API(status=STABLE) public final class Constants extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
ANSI_COLORS_DISABLED_PROPERTY_NAME
Property name used to disable ansi colors in the output (not supported by all terminals): "cucumber.ansi-colors.disabled"static String
EXECUTION_DRY_RUN_PROPERTY_NAME
Property name used to enable dry-run: "cucumber.execution.dry-run"static String
EXECUTION_EXCLUSIVE_RESOURCES_READ_TEMPLATE
Property template used to describe a mapping of tags to exclusive resources: "cucumber.execution.exclusive-resources.<tag-name>.read"static String
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"static String
EXECUTION_EXCLUSIVE_RESOURCES_TAG_TEMPLATE_VARIABLE
Tag replacement pattern for the exclusive resource templates: "<tag-name>"static String
FEATURES_PROPERTY_NAME
Property name used to set feature location: "cucumber.features"static String
FILTER_NAME_PROPERTY_NAME
Property name used to set name filter: "cucumber.filter.name"static String
FILTER_TAGS_PROPERTY_NAME
Property name used to set tag filter: "cucumber.filter.tags"static String
GLUE_PROPERTY_NAME
Property name to set the glue path: "cucumber.glue"static String
JUNIT_PLATFORM_NAMING_STRATEGY_PROPERTY_NAME
Property name used to configure the naming strategy: "cucumber.junit-platform.naming-strategy"static String
OBJECT_FACTORY_PROPERTY_NAME
Property name to select custom object factory implementation: "cucumber.object-factory"static String
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"static String
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"static String
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"static String
PARALLEL_CONFIG_STRATEGY_PROPERTY_NAME
Property name used to determine the desired configuration strategy: "cucumber.execution.parallel.config.strategy"static String
PARALLEL_EXECUTION_ENABLED_PROPERTY_NAME
Property name used to enable parallel test execution: "cucumber.execution.parallel.enabled"static String
PLUGIN_PROPERTY_NAME
Property name to enable plugins: "cucumber.plugin"static String
PLUGIN_PUBLISH_ENABLED_PROPERTY_NAME
static String
PLUGIN_PUBLISH_QUIET_PROPERTY_NAME
Property name to suppress publishing advertising banner: "cucumber.publish.quiet"static String
PLUGIN_PUBLISH_TOKEN_PROPERTY_NAME
Property name to publish with bearer token: "cucumber.publish.token"static String
SNIPPET_TYPE_PROPERTY_NAME
Property name to control naming convention for generated snippets: "cucumber.snippet-type"
-
-
-
Field Detail
-
ANSI_COLORS_DISABLED_PROPERTY_NAME
public static final String 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:
- Constant Field Values
-
EXECUTION_DRY_RUN_PROPERTY_NAME
public static final String 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:
- Constant Field Values
-
EXECUTION_EXCLUSIVE_RESOURCES_TAG_TEMPLATE_VARIABLE
public static final String EXECUTION_EXCLUSIVE_RESOURCES_TAG_TEMPLATE_VARIABLE
Tag replacement pattern for the exclusive resource templates: "<tag-name>"
-
FEATURES_PROPERTY_NAME
public static final String FEATURES_PROPERTY_NAME
Property name used to set feature location: "cucumber.features"A comma separated list of:
path/to/dir
- Load the files with the extension ".feature" for the directorypath
and its sub directories.path/name.feature
- Load the feature filepath/name.feature
from the file system.classpath:path/name.feature
- Load the feature filepath/name.feature
from the classpath.path/name.feature:3:9
- Load the scenarios on line 3 and line 9 in the filepath/name.feature
.
NOTE: When used any discovery selectors from the JUnit Platform will be ignored. Use with caution and care.
- See Also:
FeatureWithLines
, Constant Field Values
-
FILTER_NAME_PROPERTY_NAME
public static final String 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:
- Constant Field Values
-
FILTER_TAGS_PROPERTY_NAME
public static final String 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:
- Constant Field Values
-
GLUE_PROPERTY_NAME
public static final String 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:
GluePath
, Constant Field Values
-
JUNIT_PLATFORM_NAMING_STRATEGY_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="7.0.0") public static final String JUNIT_PLATFORM_NAMING_STRATEGY_PROPERTY_NAME
Property 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:
- Constant Field Values
-
PLUGIN_PROPERTY_NAME
public static final String 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:
- Constant Field Values
-
PLUGIN_PUBLISH_ENABLED_PROPERTY_NAME
public static final String PLUGIN_PUBLISH_ENABLED_PROPERTY_NAME
- See Also:
- Constant Field Values
-
PLUGIN_PUBLISH_TOKEN_PROPERTY_NAME
public static final String 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:
- Constant Field Values
-
PLUGIN_PUBLISH_QUIET_PROPERTY_NAME
public static final String PLUGIN_PUBLISH_QUIET_PROPERTY_NAME
Property name to suppress publishing advertising banner: "cucumber.publish.quiet"Valid values are
true
,false
.- See Also:
- Constant Field Values
-
OBJECT_FACTORY_PROPERTY_NAME
public static final String 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:
- Constant Field Values
-
SNIPPET_TYPE_PROPERTY_NAME
public static final String 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:
- Constant Field Values
-
PARALLEL_EXECUTION_ENABLED_PROPERTY_NAME
public static final String 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:
- Constant Field Values
-
EXECUTION_EXCLUSIVE_RESOURCES_READ_WRITE_TEMPLATE
public static final String 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
@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
public static final String 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
public static final String 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:
- Constant Field Values
-
PARALLEL_CONFIG_FIXED_PARALLELISM_PROPERTY_NAME
public static final String 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_DYNAMIC_FACTOR_PROPERTY_NAME
public static final String 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
public static final String 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
-
-