Class Constants


  • @API(status=STABLE)
    public final class Constants
    extends Object
    • 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
      • 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 directory path and its sub directories.
        • path/name.feature - Load the feature file path/name.feature from the file system.
        • classpath:path/name.feature - Load the feature file path/name.feature from the classpath.
        • path/name.feature:3:9 - Load the scenarios on line 3 and line 9 in the file path/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 or short. 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 or camelcase.

        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
         
         
        A scenario tagged with @my-tag-ab-rw will lock resource a and b 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.
        See Also:
        Junit 5 User Guide - Synchronization, Constant Field Values
      • 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.

        See Also:
        EXECUTION_EXCLUSIVE_RESOURCES_READ_WRITE_TEMPLATE, Constant Field Values
      • 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, or custom.

        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 the DefaultParallelExecutionConfigurationStrategy.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 the DefaultParallelExecutionConfigurationStrategy.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 the ParallelExecutionConfigurationStrategy to be used by the DefaultParallelExecutionConfigurationStrategy.CUSTOM configuration strategy: "cucumber.execution.parallel.config.custom.class"
        See Also:
        DefaultParallelExecutionConfigurationStrategy.CUSTOM, Constant Field Values