Debian Codegraph @

docs/behave.rst-template

raw
1 ==============
2 Using *behave*
3 ==============
4
5 The command-line tool *behave* has a bunch of `command-line arguments`_ and is
6 also configurable using `configuration files`_.
7
8 Values defined in the configuration files are used as defaults which the
9 command-line arguments may override.
10
11
12 Command-Line Arguments
13 ======================
14
15 You may see the same information presented below at any time using ``behave
16 -h``.
17
18 {cmdline}
19
20
21 Tag Expression
22 --------------
23
24 {tag_expression}
25
26
27 Configuration Files
28 ===================
29
30 Configuration files for *behave* are called either ".behaverc",
31 "behave.ini", "setup.cfg" or "tox.ini" (your preference) and are located in
32 one of three places:
33
34 1. the current working directory (good for per-project settings),
35 2. your home directory ($HOME), or
36 3. on Windows, in the %APPDATA% directory.
37
38 If you are wondering where *behave* is getting its configuration defaults
39 from you can use the "-v" command-line argument and it'll tell you.
40
41 Configuration files **must** start with the label "[behave]" and are
42 formatted in the Windows INI style, for example:
43
44 .. code-block:: ini
45
46 [behave]
47 format=plain
48 logging_clear_handlers=yes
49 logging_filter=-suds
50
51
52 Configuration Parameter Types
53 -----------------------------
54
55 The following types are supported (and used):
56
57 **text**
58 This just assigns whatever text you supply to the configuration setting.
59
60 **bool**
61 This assigns a boolean value to the configuration setting.
62 The text describes the functionality when the value is true.
63 True values are "1", "yes", "true", and "on".
64 False values are "0", "no", "false", and "off".
65
66 **sequence<text>**
67 These fields accept one or more values on new lines, for example a tag
68 expression might look like:
69
70 .. code-block:: ini
71
72 tags=@foo,~@bar
73 @zap
74
75 which is the equivalent of the command-line usage::
76
77 --tags @foo,~@bar --tags @zap
78
79
80
81 Configuration Parameters
82 -----------------------------
83
84 {config}
85
86