Class Constants

java.lang.Object
io.cucumber.junit.platform.engine.Constants

@API(status=STABLE) public final class Constants extends Object
  • Field Details

    • 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:
    • 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:
    • 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>"
      See Also:
    • FEATURES_PROPERTY_NAME

      public static final String 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 the src/test/resources/features directory
      • classpath:com/example/application -- All features in the com.example.application package
      • in-memory:/features -- All features in the /features directory on an in memory file system supported by FileSystems
      • 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. Use with caution and care.

      See Also:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • PLUGIN_PUBLISH_ENABLED_PROPERTY_NAME

      public static final String PLUGIN_PUBLISH_ENABLED_PROPERTY_NAME
      See Also:
    • 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:
    • 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:
    • 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:
    • UUID_GENERATOR_PROPERTY_NAME

      public static final String 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

      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:
    • EXECUTION_MODE_FEATURE_PROPERTY_NAME

      public static final String 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 or concurrent. Default value is concurrent.

      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.

      See Also:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • PARALLEL_CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME

      public static final String PARALLEL_CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME
      Property name used to determine the maximum pool size for the DefaultParallelExecutionConfigurationStrategy.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:
    • 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:
    • 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: