1BEHAVE(1)                        User Commands                       BEHAVE(1)
2
3
4

NAME

6       behave - Run a number of feature tests with behave.
7

DESCRIPTION

9       usage: behave [options] [ [DIR|FILE|FILE:LINE] ]+
10
11       Run a number of feature tests with behave.
12
13   positional arguments:
14       paths  Feature directory, file or file location (FILE:LINE).
15
16   options:
17       -h, --help
18              show this help message and exit
19
20       -c, --no-color
21              Disable the use of ANSI color escapes.
22
23       --color
24              Use  ANSI  color  escapes.  This is the default behaviour.  This
25              switch is used to override a configuration file setting.
26
27       -d, --dry-run
28              Invokes formatters without executing the steps.
29
30       -D NAME=VALUE, --define NAME=VALUE
31              Define user-specific data for  the  config.userdata  dictionary.
32              Example: -D foo=bar to store it in config.userdata["foo"].
33
34       -e PATTERN, --exclude PATTERN
35              Don't run feature files matching regular expression PATTERN.
36
37       -i PATTERN, --include PATTERN
38              Only run feature files matching regular expression PATTERN.
39
40       --no-junit
41              Don't output JUnit-compatible reports.
42
43       --junit
44              Output JUnit-compatible reports. When junit is enabled, all std‐
45              out and stderr will be redirected and dumped to  the  junit  re‐
46              port, regardless of the "-- capture" and "--no-capture" options.
47
48       --junit-directory PATH
49              Directory in which to store JUnit reports.
50
51       -f FORMAT, --format FORMAT
52              Specify  a formatter. If none is specified the default formatter
53              is used. Pass "--format help" to get a list of available format‐
54              ters.
55
56       --steps-catalog
57              Show  a  catalog  of  all  available  step definitions. SAME AS:
58              --format=steps.catalog --dry-run --no-summary -q
59
60       -k, --no-skipped
61              Don't print skipped steps (due to tags).
62
63       --show-skipped
64              Print skipped steps. This is the default behaviour.  This switch
65              is used to override a configuration file setting.
66
67       --no-snippets
68              Don't print snippets for unimplemented steps.
69
70       --snippets
71              Print  snippets for unimplemented steps. This is the default be‐
72              haviour. This switch is used to override  a  configuration  file
73              setting.
74
75       -m, --no-multiline
76              Don't print multiline strings and tables under steps.
77
78       --multiline
79              Print  multiline strings and tables under steps. This is the de‐
80              fault behaviour. This switch is used to override a configuration
81              file setting.
82
83       -n NAME, --name NAME
84              Only  execute the feature elements which match part of the given
85              name. If this option is given more  than  once,  it  will  match
86              against all the given names.
87
88       --no-capture
89              Don't  capture stdout (any stdout output will be printed immedi‐
90              ately.)
91
92       --capture
93              Capture stdout (any stdout output will be printed if there is  a
94              failure.) This is the default behaviour.  This switch is used to
95              override a configuration file setting.
96
97       --no-capture-stderr
98              Don't capture stderr (any stderr output will be printed  immedi‐
99              ately.)
100
101       --capture-stderr
102              Capture  stderr (any stderr output will be printed if there is a
103              failure.) This is the default behaviour.  This switch is used to
104              override a configuration file setting.
105
106       --no-logcapture
107              Don't  capture  logging.  Logging configuration will be left in‐
108              tact.
109
110       --logcapture
111              Capture logging. All logging during a step will be captured  and
112              displayed  in the event of a failure. This is the default behav‐
113              iour. This switch is used to override a configuration file  set‐
114              ting.
115
116       --logging-level LOGGING_LEVEL
117              Specify  a  level  to  capture logging at. The default is INFO -
118              capturing everything.
119
120       --logging-format LOGGING_FORMAT
121              Specify custom format to print statements. Uses the same  format
122              as  used  by standard logging handlers. The default is "%(level‐
123              name)s:%(name)s:%(message)s".
124
125       --logging-datefmt LOGGING_DATEFMT
126              Specify custom date/time format to print statements.   Uses  the
127              same format as used by standard logging handlers.
128
129       --logging-filter LOGGING_FILTER
130              Specify  which  statements  to filter in/out. By default, every‐
131              thing is captured. If the output is too verbose, use this option
132              to  filter  out  needless output.  Example: --logging-filter=foo
133              will capture statements issued ONLY to foo or  foo.what.ever.sub
134              but  not  foobar  or other logger. Specify multiple loggers with
135              comma: filter=foo,bar,baz. If any logger name is prefixed with a
136              minus, eg filter=-foo, it will be excluded rather than included.
137
138       --logging-clear-handlers
139              Clear all other logging handlers.
140
141       --no-summary
142              Don't display the summary at the end of the run.
143
144       --summary
145              Display the summary at the end of the run.
146
147       -o FILE, --outfile FILE
148              Write to specified file instead of stdout.
149
150       -q, --quiet
151              Alias for --no-snippets --no-source.
152
153       -s, --no-source
154              Don't  print  the  file and line of the step definition with the
155              steps.
156
157       --show-source
158              Print the file and line of the step definition with  the  steps.
159              This is the default behaviour. This switch is used to override a
160              configuration file setting.
161
162       --stage STAGE
163              Defines the current test stage. The test stage name is  used  as
164              name  prefix  for  the  environment file and the steps directory
165              (instead of default path names).
166
167       --stop Stop running tests at the first failure.
168
169       -t TAG_EXPRESSION, --tags TAG_EXPRESSION
170              Only execute features or scenarios with  tags  matching  TAG_EX‐
171              PRESSION. Pass "--tags-help" for more information.
172
173       -T, --no-timings
174              Don't print the time taken for each step.
175
176       --show-timings
177              Print  the  time  taken, in seconds, of each step after the step
178              has completed. This is the default behaviour.   This  switch  is
179              used to override a configuration file setting.
180
181       -v, --verbose
182              Show the files and features loaded.
183
184       -w, --wip
185              Only  run  scenarios  tagged  with  "wip". Additionally: use the
186              "plain" formatter, do not capture stdout or logging  output  and
187              stop at the first failure.
188
189       -x, --expand
190              Expand scenario outline tables in output.
191
192       --lang LANG
193              Use keywords for a language other than English.
194
195       --lang-list
196              List the languages available for --lang.
197
198       --lang-help LANG
199              List the translations accepted for one language.
200
201       --tags-help
202              Show help for tag expressions.
203
204       --version
205              Show version.
206
207
208
209behave 1.2.6                       July 2023                         BEHAVE(1)
Impressum