Running BDD
Features run through one of two paths, both driven by the same
TestRunner.
ferridriver bdd (the CLI)
Primary path. Runs Gherkin features through the core test runner with Rust and / or JS / TS step bodies — no Node, no Bun:
--steps is repeatable and overrides [test].steps from the config
file. Defaults to steps/**/*.{js,ts} and
step_definitions/**/*.{js,ts} when omitted.
Flags
Plus the shared browser flags (--backend, --headless,
--executable-path, --connect, --auto-connect, --user-data-dir).
Rust / cargo test
Use bdd_main!() as the binary entry point and the shared runner flags:
Tests run headed by default; pass --headless to opt into headless mode.
Reporters
Specify multiple reporters by repeating --reporter, e.g. --reporter terminal --reporter junit. Each name is matched exactly (no name:path
syntax). File-writing reporters emit into the run's output directory —
junit writes junit.xml, json writes results.json. Set the path or
per-reporter options with a [[test.reporter]] table in the config file.
A name that is neither built in nor a path to a reporter module is
refused with the list above; see
custom reporters.
The cucumber-json document
cucumber-json writes the document cucumber's own ecosystem reads,
field for field: a feature's id, line, description and tags[]
(each with the line it was written on), an element's id
(feature;rule;scenario), keyword, line and description, and a
step's line, arguments (a data table as {rows:[{cells}]}, a doc
string as {content, line}) and result.duration in nanoseconds.
Hooks appear as hidden steps keyworded Before or After.
Feature entries are keyed on the file AND the project, so a run over
several projects produces one entry per project rather than merging
them; the entry's id carries the project name.
There is no cucumber-html reporter. The HTML report is produced from
this document by the tool that owns the format
(cucumber-html-reporter, multiple-cucumber-html-reporter), which
reads exactly the file cucumber-json writes.
Environment variables
The shared runner env vars apply (see CLI reference —
FERRIDRIVER_DEBUG, FERRIDRIVER_PROFILE, RUST_LOG, etc.).