| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
dryRun |
String[] |
extraGlue
Package to load additional glue code (step definitions, hooks and
plugins) from.
|
String[] |
features
Either a URI or path to a directory of features or a URI or path to a single
feature optionally followed by a colon and line numbers.
|
String[] |
glue
Package to load glue code (step definitions,
hooks and plugins) from.
|
boolean |
monochrome |
String[] |
name
Only run scenarios whose names match one of the provided regular expressions.
|
Class<? extends ObjectFactory> |
objectFactory
Specify a custom ObjectFactory.
|
String[] |
plugin
Register plugins.
|
CucumberOptions.SnippetType |
snippets |
boolean |
strict |
String[] |
tags
Only run scenarios tagged with tags matching
TAG_EXPRESSION. |
public abstract boolean dryRun
public abstract boolean strict
public abstract String[] features
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 in classpath:com/example.
FeatureWithLinespublic abstract String[] glue
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 in com.example.
GluePathpublic abstract String[] extraGlue
com.example.app
These packages are used in addition to the default described in #glue.
public abstract String[] tags
TAG_EXPRESSION.
For example "@smoke and not @fast".
public abstract String[] plugin
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
Pluginpublic abstract boolean monochrome
public abstract String[] name
public abstract CucumberOptions.SnippetType snippets
public abstract Class<? extends ObjectFactory> 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.
ObjectFactory implementationCopyright © 2019. All rights reserved.