| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
dryRun
Skip execution of glue code.
|
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.
|
String[] |
junit
Deprecated.
use
useFileNameCompatibleName() or
stepNotifications() instead. |
boolean |
monochrome
Don't colour terminal output.
|
String[] |
name
Only run scenarios whose names match provided regular expression.
|
String[] |
plugin
Register plugins.
|
CucumberOptions.SnippetType |
snippets
Format of the generated snippets.
|
boolean |
stepNotifications
Provide step notifications.
|
boolean |
strict
Treat undefined and pending steps as errors.
|
String[] |
tags
Only run scenarios tagged with tags matching
TAG_EXPRESSION. |
boolean |
useFileNameCompatibleName
Use filename compatible names.
|
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 String[] name
public abstract CucumberOptions.SnippetType snippets
@Deprecated public abstract String[] junit
useFileNameCompatibleName() or
stepNotifications() instead.public abstract boolean useFileNameCompatibleName
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.
public abstract boolean stepNotifications
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.
Copyright © 2019. All rights reserved.