BEHAVE(1)

πŸ“¦
version 1.3.3 Β· 3 versions
, in fedora 44

πŸ’– BEHAVE πŸ’–

okay bestie, listen β€” this is the manual page for behave, a User Command, and it's genuinely iconic. we're gonna go through the whole thing together, no skips, no shortcuts, because you deserve the full picture. 🫢


🌸 NAME 🌸

behave β€” run a number of feature tests with behave. that's it. that's the vibe. ✨


πŸŽ€ DESCRIPTION πŸŽ€

the usage line, in all its glory:

usage: behave [options] [DIRECTORY|FILE|FILE:LINE|AT_FILE]*

Run a number of feature tests with behave. lowkey the whole point of the program, fr fr. πŸ’…


✨ EXAMPLES ✨

here's how people actually invoke it, look at these:

behave features/ behave features/one.feature features/two.feature
behave features/one.feature:10 behave @features.txt

yes bestie, you can point it at a whole directory, at individual feature files, at a specific line in a feature file, or at an @-file. main character energy across the board. πŸ‘‘


πŸ“ positional arguments πŸ“

  • paths β€” Feature directory, file or file-location (FILE:LINE). so you can hand it a folder, a file, or a file plus a line number. whatever your heart desires. πŸ¦‹

πŸ’… options πŸ’…

strap in, this list is long and every single one of these matters:

  • -h, --help β€” show this help message and exit. the classic. the legend. 🌈
  • -C, --no-color β€” Disable colored mode. no pretty colors for you, sad but valid. 😭
  • --color [{auto,on,off,always,never}] β€” Use colored mode or not (default: auto). pick your fighter from the list, or just let it decide for itself. ✨
  • -d, --dry-run β€” Invokes formatters without executing the steps. like a rehearsal, but nothing actually happens. 🎭
  • -D, --define NAME=VALUE β€” Define user-specific data for the config.userdata dictionary. Example: -D foo=bar to store it in config.userdata["foo"]. literally your own little stash of custom data. πŸ“
  • -e, --exclude PATTERN β€” Don't run feature files matching regular expression PATTERN. yeet those files out of the run. πŸ’€
  • -i, --include PATTERN β€” Only run feature files matching regular expression PATTERN. picky and i respect it. πŸŽ€
  • --no-junit β€” Don't output JUnit-compatible reports.
  • --junit β€” Output JUnit-compatible reports. When junit is enabled, all stdout and stderr will be redirected and dumped to the junit report, regardless of the "-- capture" and "--no-capture" options. so heads up: junit mode does NOT care what capture settings you picked. πŸ™ˆ
  • --junit-directory PATH β€” Directory in which to store JUnit reports.
  • -j, --jobs, --parallel NUMBER β€” Number of concurrent jobs to use (default: 1). Only supported by test runners that support parallel execution. so if your runner doesn't do parallel, this does nothing for you, no cap. πŸ”₯
  • -f, --format FORMATTER β€” Specify a formatter. If none is specified the default formatter is used. Pass "--format help" to get a list of available formatters. go window shopping, bestie. πŸ‘‘
  • --steps-catalog β€” Show a catalog of all available step definitions. SAME AS: "--format=steps.catalog --dry-run --no-summary -q". a shortcut, a blessing. ✨
  • --no-skipped β€” Don't print skipped steps (due to tags).
  • --show-skipped β€” Print skipped steps. This is the default behaviour. This switch is used to override a configuration file setting. so if your config file said otherwise, this says "actually, no." πŸ’…
  • --no-snippets β€” Don't print snippets for unimplemented steps.
  • --snippets β€” Print snippets for unimplemented steps. This is the default behaviour. This switch is used to override a configuration file setting.
  • --no-multiline β€” Don't print multiline strings and tables under steps.
  • --multiline β€” Print multiline strings and tables under steps. This is the default behaviour. This switch is used to override a configuration file setting.
  • -n, --name NAME_PATTERN β€” Select feature elements (scenarios, ...) to run which match part of the given name (regex pattern). If this option is given more than once, it will match against all the given names. stack 'em up, it'll match all of them. πŸ¦‹
  • --capture β€” Enable capture mode (stdout/stderr/log-output). Any capture output will be printed on a failure/error. quiet while things go right, loud the second they don't. πŸ”₯
  • --no-capture β€” Disable capture mode (stdout/stderr/log-output).
  • --capture-stdout β€” Enable capture of stdout.
  • --no-capture-stdout β€” Disable capture of stdout.
  • --capture-stderr β€” Enable capture of stderr.
  • --no-capture-stderr β€” Disable capture of stderr.
  • --capture-log, --logcapture β€” Enable capture of logging output.
  • --no-capture-log, --no-logcapture β€” Disable capture of logging output.
  • --capture-hooks β€” Enable capture of hooks (except: before_all). note the exception, bestie β€” before_all is NOT captured. πŸ™ˆ
  • --no-capture-hooks β€” Disable capture of hooks.
  • --logging-level LOG_LEVEL β€” Specify a level to capture logging at. The default is INFO - capturing everything. everything, all of it, the whole log. 😭
  • --logging-format LOG_FORMAT β€” Specify custom format to print statements. Uses the same format as used by standard logging handlers. The default is "%(levelname)s:%(name)s:%(message)s".
  • --logging-datefmt LOG_DATE_FORMAT β€” Specify custom date/time format to print statements. Uses the same format as used by standard logging handlers.
  • --logging-filter LOG_FILTER β€” Specify which statements to filter in/out. By default, everything is captured. If the output is too verbose, use this option to filter out needless output. Example: --logging-filter=foo will capture statements issued ONLY to foo or foo.what.ever.sub but not foobar or other logger. Specify multiple loggers with comma: filter=foo,bar,baz. If any logger name is prefixed with a minus, eg filter=-foo, it will be excluded rather than included. so - means "not you, bestie." πŸ’…
  • --logging-clear-handlers β€” Clear existing logging handlers (during capture-log).
  • --no-logging-clear-handlers β€” Keep existing logging handlers (during capture-log).
  • --no-summary β€” Don't display the summary at the end of the run.
  • --summary β€” Display the summary at the end of the run.
  • -o, --outfile FILENAME β€” Write formatter output to output-file (default: stdout). redirect that glow-up to a file. ✨
  • -q, --quiet β€” Alias for --no-snippets --no-source. two-for-one deal, we love a shortcut. πŸŽ€
  • -r, --runner RUNNER_CLASS β€” Use own runner class, like: "behave.runner:Runner". bring your own runner, be your own boss. πŸ‘‘
  • --no-source β€” Don't print the file and line of the step definition with the steps.
  • --show-source β€” Print the file and line of the step definition with the steps. This is the default behaviour. This switch is used to override a configuration file setting.
  • --stage STAGE β€” Defines the current test stage. The test stage name is used as name prefix for the environment file and the steps directory (instead of default path names). naming things is a superpower fr. πŸ¦‹
  • --stop β€” Stop running tests at the first failure. one strike and we're out. πŸ’€
  • -t, --tags TAG_EXPRESSION β€” Only execute features or scenarios with tags matching TAG_EXPRESSION. Use :option:`--tags-help` option for more information. (yes that's the literal text, we keep it, no editing the lore.)
  • -T, --no-timings β€” Don't print the time taken for each step.
  • --show-timings β€” Print the time taken, in seconds, of each step after the step has completed. This is the default behaviour. This switch is used to override a configuration file setting.
  • -v, --verbose β€” Show the files and features loaded. tell me everything, i want the tea. β˜•
  • -w, --wip β€” Only run scenarios tagged with "wip". Additionally: use the "plain" formatter, do not capture stdout or logging output and stop at the first failure. it's a whole bundle, a combo meal, and honestly? iconic. πŸ”₯
  • --lang LANG β€” Use keywords for a language other than English. multilingual queen. 🌍
  • --lang-list β€” List the languages available for --lang.
  • --lang-help LANG β€” List the translations accepted for one language.
  • --tags-help β€” Show help for tag expressions.
  • --version β€” Show version.

ngl, that's a LOT of flags, but you ate that. every single one is here, nothing skipped, periodt. πŸ’…

this is behave 1.3.3, dated January 2026, and it lives in the User Commands section of the manual β€” so go forth, run your feature tests, and slay. bye bestie, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from