Annotation Interface CucumberOptions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated, for removal: This API element is subject to removal in a future version. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanDeprecated, for removal: This API element is subject to removal in a future version.Return true if glue code execution should be skipped.String[]Deprecated, for removal: This API element is subject to removal in a future version.Package to load additional glue code (step definitions, hooks and plugins) from.String[]Deprecated, for removal: This API element is subject to removal in a future version.A list of features paths.String[]Deprecated, for removal: This API element is subject to removal in a future version.Package to load glue code (step definitions, hooks and plugins) from.booleanDeprecated, for removal: This API element is subject to removal in a future version.Returns true if terminal output should be without colours.String[]Deprecated, for removal: This API element is subject to removal in a future version.Only run scenarios whose names match one of the provided regular expressions.Class<? extends ObjectFactory> Deprecated, for removal: This API element is subject to removal in a future version.Specify a custom ObjectFactory.String[]Deprecated, for removal: This API element is subject to removal in a future version.Register plugins.booleanDeprecated, for removal: This API element is subject to removal in a future version.Publish report to reports.cucumber.io.Deprecated, for removal: This API element is subject to removal in a future version.Returns the format of the generated snippets.booleanDeprecated, for removal: This API element is subject to removal in a future version.Provide step notifications.Deprecated, for removal: This API element is subject to removal in a future version.Only run scenarios tagged with tags matching Tag Expression.booleanDeprecated, for removal: This API element is subject to removal in a future version.Use filename compatible names.Class<? extends UuidGenerator> Deprecated, for removal: This API element is subject to removal in a future version.Specify a custom ObjectFactory.
-
Element Details
-
dryRun
boolean dryRunDeprecated, for removal: This API element is subject to removal in a future version.Return true if glue code execution should be skipped.- Returns:
- true if glue code execution should be skipped.
- Default:
false
-
features
String[] featuresDeprecated, for removal: This API element is subject to removal in a future version.A list of features paths.A feature path is constructed as
[ PATH[.feature[:LINE]*] | URI[.feature[:LINE]*] | @PATH ]Examples:
src/test/resources/features-- All features in thesrc/test/resources/featuresdirectoryclasspath:com/example/application-- All features in thecom.example.applicationpackagein-memory:/features-- All features in the/featuresdirectory on an in memory file system supported byFileSystemssrc/test/resources/features/example.feature:42-- The scenario or example at line 42 in the example feature file@target/rerun-- All the scenarios in the files in the rerun directory@target/rerun/RunCucumber.txt-- All the scenarios in RunCucumber.txt file
When no feature path is provided, Cucumber will use the package of the annotated class. For example, if the annotated class is
com.example.RunCucumberthen features are assumed to be located inclasspath:com/example.- Returns:
- list of files or directories
- See Also:
- Default:
{}
-
glue
String[] glueDeprecated, for removal: This API element is subject to removal in a future version.Package to load glue code (step definitions, hooks and plugins) from. E.g:com.example.appWhen no glue is provided, Cucumber will use the package of the annotated class. For example, if the annotated class is
com.example.RunCucumberthen glue is assumed to be located incom.example.- Returns:
- list of package names
- See Also:
- Default:
{}
-
extraGlue
String[] extraGlueDeprecated, for removal: This API element is subject to removal in a future version.Package to load additional glue code (step definitions, hooks and plugins) from. E.g:com.example.appThese packages are used in addition to the default described in
glue().- Returns:
- list of package names
- Default:
{}
-
tags
String tagsDeprecated, for removal: This API element is subject to removal in a future version.Only run scenarios tagged with tags matching Tag Expression.For example
"@smoke and not @fast".- Returns:
- a tag expression
- Default:
""
-
plugin
String[] pluginDeprecated, for removal: This API element is subject to removal in a future version.Register plugins. Built-in plugin types:junit,html,pretty,progress,json,usage,unused,rerun,testng.Can also be a fully qualified class name, allowing registration of 3rd party plugins.
Plugins can be provided with an argument. For example
json:target/cucumber-report.json- Returns:
- list of plugins
- See Also:
- Default:
{}
-
publish
boolean publishDeprecated, for removal: This API element is subject to removal in a future version.Publish report to reports.cucumber.io.- Returns:
- true if reports should be published on the web.
- Default:
false
-
monochrome
boolean monochromeDeprecated, for removal: This API element is subject to removal in a future version.Returns true if terminal output should be without colours.- Returns:
- true if terminal output should be without colours.
- Default:
false
-
name
String[] nameDeprecated, for removal: This API element is subject to removal in a future version.Only run scenarios whose names match one of the provided regular expressions.- Returns:
- a list of regular expressions
- Default:
{}
-
snippets
CucumberOptions.SnippetType snippetsDeprecated, for removal: This API element is subject to removal in a future version.Returns the format of the generated snippets.- Returns:
- the format of the generated snippets.
- Default:
UNDERSCORE
-
useFileNameCompatibleName
boolean useFileNameCompatibleNameDeprecated, for removal: This API element is subject to removal in a future version.Use filename compatible names.Make sure that the names of the test cases only is made up of [A-Za-Z0-9_] so that the names for certain can be used as file names.
Gradle for instance will use these names in the file names of the JUnit xml report files.
- Returns:
- true to enforce the use of well-formed file names
- Default:
false
-
stepNotifications
boolean stepNotificationsDeprecated, for removal: This API element is subject to removal in a future version.Provide step notifications.By default steps are not included in notifications and descriptions. This aligns test case in the Cucumber-JVM domain (Scenarios) with the test case in the JUnit domain (the leafs in the description tree), and works better with the report files of the notification listeners like maven surefire or gradle.
- Returns:
- true to include steps should be included in notifications
- Default:
false
-
objectFactory
Class<? extends ObjectFactory> objectFactoryDeprecated, for removal: This API element is subject to removal in a future version.Specify a custom ObjectFactory.In case a custom ObjectFactory is needed, the class can be specified here. A custom ObjectFactory might be needed when more granular control is needed over the dependency injection mechanism.
- Returns:
- an
ObjectFactoryimplementation
- Default:
io.cucumber.junit.NoObjectFactory.class
-
uuidGenerator
Class<? extends UuidGenerator> uuidGeneratorDeprecated, for removal: This API element is subject to removal in a future version.Specify a custom ObjectFactory.In case a custom ObjectFactory is needed, the class can be specified here. A custom ObjectFactory might be needed when more granular control is needed over the dependency injection mechanism.
- Returns:
- an
ObjectFactoryimplementation
- Default:
io.cucumber.junit.NoUuidGenerator.class
-
cucumber-junit-platform-engine.