cucumber

behavior-driven development test runner

TLDR

Run all features
$ cucumber
Run specific feature file
$ cucumber [features/login.feature]
Run specific scenario by line
$ cucumber [features/login.feature]:[10]
Run with specific tag
$ cucumber --tags @[smoke]
Run excluding tag
$ cucumber --tags "not @[wip]"
Generate HTML report
$ cucumber --format html --out [report.html]
Dry run (check syntax only)
$ cucumber --dry-run

SYNOPSIS

cucumber [options] [files|dirs]

DESCRIPTION

cucumber runs Behavior-Driven Development (BDD) tests written in Gherkin, a human-readable language for describing software behavior. It connects plain-language scenarios to executable step definitions.Features describe behavior in Given/When/Then format that both developers and stakeholders can understand. Step definitions in Ruby (or other languages) implement the actual test logic.

PARAMETERS

-t, --tags expr

Run scenarios matching tag expression.
-f, --format type
Output format (pretty, progress, html, json).
-o, --out file
Write output to file.
-r, --require path
Require files before execution.
-d, --dry-run
Check syntax without running.
-s, --strict
Fail on undefined or pending steps.
--retry n
Retry failing scenarios n times.
-p, --profile name
Use named profile from cucumber.yml.
--order type
Run order (defined, random).

CONFIGURATION

cucumber.yml

Defines reusable profiles with pre-configured options for different test runs.

INSTALL

nix profile install nixpkgs#cucumber

CAVEATS

Step definitions must match scenario steps exactly. Shared state between steps can cause flaky tests. Gherkin syntax errors stop execution. Slow for large test suites.

HISTORY

Cucumber was created by Aslak Hellesoy in 2008, inspired by RSpec and JBehave. It popularized BDD by enabling executable specifications in plain language. Originally Ruby-based, implementations now exist for Java, JavaScript, and many other languages.

SEE ALSO

rspec(1), jest(1), pytest(1)