Annotation Type CucumberOptions
-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
String[]
Package to load additional glue code (step definitions, hooks and plugins) from.String[]
A list of features paths.String[]
Package to load glue code (step definitions, hooks and plugins) from.boolean
String[]
Only run scenarios whose names match one of the provided regular expressions.Class<? extends ObjectFactory>
Specify a custom ObjectFactory.String[]
Register plugins.boolean
Publish report to https://reports.cucumber.io.Only run scenarios tagged with tags matchingTAG_EXPRESSION
.Class<? extends UuidGenerator>
Specify a custom ObjectFactory.
-
Element Details
-
dryRun
boolean dryRun- Returns:
- true if glue code execution should be skipped.
- Default:
- false
-
features
String[] featuresA 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/features
directoryclasspath:com/example/application
-- All features in thecom.example.application
packagein-memory:/features
-- All features in the/features
directory on an in memory file system supported byFileSystems
src/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.RunCucumber
then features are assumed to be located inclasspath:com/example
.- Returns:
- list of files or directories
- See Also:
- Default:
- {}
-
glue
String[] gluePackage to load glue code (step definitions, hooks and plugins) from. E.g:com.example.app
When no glue is provided, Cucumber will use the package of the annotated class. For example, if the annotated class is
com.example.RunCucumber
then glue is assumed to be located incom.example
.- Returns:
- list of package names
- See Also:
- Default:
- {}
-
extraGlue
String[] extraGluePackage to load additional glue code (step definitions, hooks and plugins) from. E.g:com.example.app
These packages are used in addition to the default described in
#glue
.- Returns:
- list of package names
- Default:
- {}
-
tags
String tagsOnly run scenarios tagged with tags matchingTAG_EXPRESSION
.For example
"@smoke and not @fast"
.- Returns:
- a tag expression
- Default:
- ""
-
plugin
String[] pluginRegister 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:
-
Plugin
- Default:
- {}
-
publish
boolean publishPublish report to https://reports.cucumber.io.- Returns:
- true if reports should be published on the web.
- Default:
- false
-
monochrome
boolean monochrome- Returns:
- true if terminal output should be without colours.
- Default:
- false
-
name
String[] nameOnly run scenarios whose names match one of the provided regular expressions.- Returns:
- a list of regular expressions
- Default:
- {}
-
snippets
CucumberOptions.SnippetType snippets- Returns:
- the format of the generated snippets.
- Default:
- UNDERSCORE
-
objectFactory
Class<? extends ObjectFactory> objectFactorySpecify 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
ObjectFactory
implementation
- Default:
- io.cucumber.testng.NoObjectFactory.class
-
uuidGenerator
Class<? extends UuidGenerator> uuidGeneratorSpecify 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
ObjectFactory
implementation
- Default:
- io.cucumber.testng.NoUuidGenerator.class
-