Cucumber’s Runtime Options

Let’s start by exploring the runtime options. Cucumber provides a --help option, which you can invoke from the command line (you’ll need to have cucumber-core.jar and gherkin.jar on your classpath):

 
$ ​java cucumber.api.cli.Main --help
 
 
Usage: java cucumber.api.cli.Main [options] [ [FILE|DIR][:LINE[:LINE]*] ]+
 
 
Options:
 
 
-g, --glue PATH
 
Where glue code is loaded from.
 
-p, --plugin PLUGIN[:PATH_OR_URL]
 
Register a plugin.
 
Built-in PLUGIN types: junit, html, pretty, progress, json, usage,
 
rerun. PLUGIN can also be a fully qualified class name, allowing
 
registration of 3rd party plugins.
 
-f, --format FORMAT[:PATH_OR_URL]
 
Deprecated. Use --plugin instead.
 
-t, --tags TAG_EXPRESSION
 
Only run ...

Get The Cucumber for Java Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.