Interface Cucumber

All Superinterfaces:
org.aeonbits.owner.Config, EngineProperties<Cucumber>, Serializable

@Sources({"system:properties","file:src/main/resources/properties/cucumber.properties","file:src/main/resources/properties/default/cucumber.properties","classpath:cucumber.properties"}) public interface Cucumber extends EngineProperties<Cucumber>
Configuration properties interface for Cucumber test execution in the SHAFT framework. Properties can be supplied via system properties, cucumber.properties files on the classpath or file-system, and are hot-reloaded at runtime.

Use EngineProperties.set() to override values programmatically.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.aeonbits.owner.Config

    org.aeonbits.owner.Config.ConverterClass, org.aeonbits.owner.Config.DecryptorClass, org.aeonbits.owner.Config.DefaultValue, org.aeonbits.owner.Config.DisableableFeature, org.aeonbits.owner.Config.DisableFeature, org.aeonbits.owner.Config.EncryptedValue, org.aeonbits.owner.Config.HotReload, org.aeonbits.owner.Config.HotReloadType, org.aeonbits.owner.Config.Key, org.aeonbits.owner.Config.LoadPolicy, org.aeonbits.owner.Config.LoadType, org.aeonbits.owner.Config.PreprocessorClasses, org.aeonbits.owner.Config.Separator, org.aeonbits.owner.Config.Sources, org.aeonbits.owner.Config.TokenizerClass

    Nested classes/interfaces inherited from interface EngineProperties

    EngineProperties.SetProperty
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Whether ANSI color output is disabled in Cucumber's console output.
    boolean
    Whether Cucumber runs in dry-run mode, parsing but not executing step definitions.
    Maximum number of scenarios to execute.
    Order in which Cucumber scenarios are executed (e.g., "lexical" or "random").
    boolean
    Whether Cucumber runs in strict mode, treating undefined and pending steps as failures.
    boolean
    Whether Cucumber runs in WIP (work-in-progress) mode, failing if any scenario passes.
    Path(s) to the feature files or directories containing Cucumber feature files.
    Regular expression filter to select scenarios by name.
    Tag expression used to filter which scenarios are executed (e.g., "@smoke and not @slow").
    Comma-separated list of packages to scan for Cucumber step definitions and hooks.
    Fully qualified class name of a custom Cucumber object factory for dependency injection.
    Comma-separated list of Cucumber plugins used for reporting and listeners.
    boolean
    Whether the Cucumber publish report banner is suppressed from console output.
    Snippet style used when generating missing step definition stubs (e.g., "underscore" or "camelcase").

    Methods inherited from interface EngineProperties

    set
  • Method Details

    • cucumberAnsiColorsDisabled

      @Key("cucumber.ansi-colors.disabled") @DefaultValue("false") boolean cucumberAnsiColorsDisabled()
      Whether ANSI color output is disabled in Cucumber's console output.

      Property key: cucumber.ansi-colors.disabled — default: false

      Returns:
      true to disable ANSI colors; false to keep them enabled
    • cucumberExecutionDryRun

      @Key("cucumber.execution.dry-run") @DefaultValue("false") boolean cucumberExecutionDryRun()
      Whether Cucumber runs in dry-run mode, parsing but not executing step definitions.

      Property key: cucumber.execution.dry-run — default: false

      Returns:
      true to enable dry-run mode; false for normal execution
    • cucumberExecutionLimit

      @Key("cucumber.execution.limit") @DefaultValue("") String cucumberExecutionLimit()
      Maximum number of scenarios to execute. An empty value means no limit.

      Property key: cucumber.execution.limit — default: ""

      Returns:
      the execution limit as a string, or empty for unlimited
    • cucumberExecutionOrder

      @Key("cucumber.execution.order") @DefaultValue("lexical") String cucumberExecutionOrder()
      Order in which Cucumber scenarios are executed (e.g., "lexical" or "random").

      Property key: cucumber.execution.order — default: "lexical"

      Returns:
      the execution order string
    • cucumberExecutionStrict

      @Key("cucumber.execution.strict") @DefaultValue("true") boolean cucumberExecutionStrict()
      Whether Cucumber runs in strict mode, treating undefined and pending steps as failures.

      Property key: cucumber.execution.strict — default: true

      Returns:
      true to fail on undefined/pending steps; false to allow them
    • cucumberExecutionWip

      @Key("cucumber.execution.wip") @DefaultValue("false") boolean cucumberExecutionWip()
      Whether Cucumber runs in WIP (work-in-progress) mode, failing if any scenario passes.

      Property key: cucumber.execution.wip — default: false

      Returns:
      true to enable WIP mode; false otherwise
    • cucumberFeatures

      @Key("cucumber.features") @DefaultValue("src/test/resources") String cucumberFeatures()
      Path(s) to the feature files or directories containing Cucumber feature files.

      Property key: cucumber.features — default: "src/test/resources"

      Returns:
      the features path string
    • cucumberFilterName

      @Key("cucumber.filter.name") @DefaultValue("") String cucumberFilterName()
      Regular expression filter to select scenarios by name. An empty value runs all scenarios.

      Property key: cucumber.filter.name — default: ""

      Returns:
      the name filter regex, or empty to run all scenarios
    • cucumberFilterTags

      @Key("cucumber.filter.tags") @DefaultValue("") String cucumberFilterTags()
      Tag expression used to filter which scenarios are executed (e.g., "@smoke and not @slow"). An empty value runs all scenarios.

      Property key: cucumber.filter.tags — default: ""

      Returns:
      the tag filter expression, or empty to run all scenarios
    • cucumberGlue

      @Key("cucumber.glue") @DefaultValue("customCucumberSteps, com.shaft.cucumber") String cucumberGlue()
      Comma-separated list of packages to scan for Cucumber step definitions and hooks.

      Property key: cucumber.glue — default: "customCucumberSteps, com.shaft.cucumber"

      Returns:
      the glue path(s) string
    • cucumberPlugin

      @Key("cucumber.plugin") @DefaultValue("pretty, json:allure-results/cucumber.json, html:allure-results/cucumberReport.html, com.shaft.listeners.CucumberTestRunnerListener") String cucumberPlugin()
      Comma-separated list of Cucumber plugins used for reporting and listeners.

      Property key: cucumber.plugin — default: pretty, JSON, HTML, and SHAFT listener

      Returns:
      the plugin configuration string
    • cucumberObjectFactory

      @Key("cucumber.object-factory") @DefaultValue("") String cucumberObjectFactory()
      Fully qualified class name of a custom Cucumber object factory for dependency injection. An empty value uses the default object factory.

      Property key: cucumber.object-factory — default: ""

      Returns:
      the object factory class name, or empty to use the default
    • cucumberSnippetType

      @Key("cucumber.snippet-type") @DefaultValue("underscore") String cucumberSnippetType()
      Snippet style used when generating missing step definition stubs (e.g., "underscore" or "camelcase").

      Property key: cucumber.snippet-type — default: "underscore"

      Returns:
      the snippet type string
    • cucumberPublishQuiet

      @Key("cucumber.publish.quiet") @DefaultValue("true") boolean cucumberPublishQuiet()
      Whether the Cucumber publish report banner is suppressed from console output.

      Property key: cucumber.publish.quiet — default: true

      Returns:
      true to suppress the publish banner; false to display it