O'Reilly logo

The Cucumber for Java Book by Seb Rose, Matt Wynne, Aslak Hellesoy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required