This is a leiningen plugin for use with cucumber-jvm. This is a fork of lein-cucumber with more up to date dependencies.
- Add
[lein-cucumber "1.0.4"]
to:plugins
in your project.clj - Run
lein deps
to fetch all dependencies. - Run all Cucumber features with
lein cucumber
lein-cucumber requires Leiningen 2.
Feature paths are resolved in the following order:
- Command line options (e.g.
lein cucumber my-features
) override all other settings. - If no command line options for feature paths are given, the
:cucumber-feature-paths
parameter in your project.clj will be used (e.g.:cucumber-feature-paths ["test/features/"]
). - If neither command line options nor a parameter is used, lein-cucumber looks for features in the
features/
directory.
Glue paths are resolved similarily:
- Command line options (e.g.
lein cucumber --glue somewhere/my_stepdefs
) override all other settings. - If no command line options for glue paths are given, step definitions will be loaded from
step_definitions/
directories inside your feature directories.
Formatted output
- Results are only printed to the console unless you specify a formatter
- To create an HTML report you can run the plugin with the following command
lein cucumber --plugin html:target/test-reports
The following settings are hard-coded into the plugin:
- A summary report will be printed to the console.
- Leiningen will exit with the exit status of the cucumber-jvm runtime.
See https://github.com/nilswloka/cucumber-jvm/tree/new-clojure-example/examples/clojure_cukes for an example project.
If you like lein-cucumber, consider endorsing me at coderwall:
Written by Jeremy Anderson, 2015. For licensing information, see UNLICENSE.
Please have a look at http://unlicense.org if you plan to contribute.