BDD Config¶
The BDD configuration file contains information that tells BDD how to execute. While BDD adds to this file during execution, users choose which values it starts with.
BDD selects the default.config file automatically. You can choose
which configuration to load by passing it into the bdd:test(config)
or bdd:feature(config, feature) methods.
| Item | Required | Default | Comment |
|---|---|---|---|
| url | yes | none | This is the URL that BDD will use for testing |
| user | no | none | If your site requires auth, then this is required |
| password | no | none | If your site requires auth, then this is required. WARNING: Retained in clear text! Do not store production passwords here! |
| log | no | [true, puts, info, warn, error] | used by bdd_utils:log printouts. Create list with none, some or all of the following: [puts, trace, debug, info, warn] |
| titles | no | [pass, fail, skip, header, result, feature, step, step_pass, step_fail] | used by bdd_utils:log printouts. |
| environment | no | undefined | used by Unless step prefix to skip tests |
| results_out | no | /tmp/bdd_results.out | stores the detailed results of the tests. Used by bdd:failed(). |
| coverage_out | no | /tmp/bdd.html | HTML version of test results |
| marker_url | no | undefined | If undefined, this behavior is turned off. If defined, BDD does a web request to URL with debug information to make it easier to find matching steps in the log. For OpenCrowbar, the url is `utils/marker` |
| marker_log/td> | no | /var/log/crowbar/development.log | Should point to the path where you log API calls |
| cli | no | undefined | Used by bdd_clirat for the command to the CLI if not in the given |
| cli_user_key | no | --username | Used by bdd_clirat to pass the username into the CLI |
| cli_password_key | no | --password | Used by bdd_clirat to pass the password into the CLI |
| cli_url_key | no | --url | Used by bdd_clirat to pass the URL into the CLI |
Example Config¶
%%-*-erlang-*-
{url, "http://192.168.124.10:3000"}.
{user, "developer"}.
{password,"Cr0wbar!"}.
{feature_path,"features/"}.
{extension, "feature"}.
{global_setup, crowbar}.
{secondary_step_files, [crowbar_rest, crowbar, bdd_webrat, bdd_restrat, bdd_catchall]}.
{translation_error, "translation_missing"}.