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