Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration: add "Global profile configuration" #155

Merged
merged 3 commits into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions user_guide/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,38 @@ All files from the ``imports`` block will be loaded by Behat and merged, in the

This allows configuration files listed in the ``imports`` key to override configuration values for previously listed files.

Global profile configuration
----------------------------

You can set some global configuration in your profile configuration:

.. code-block:: yaml

# behat.yml
default:
testers: # these are the default values
stop_on_failure: false
strict: false

Combining the fact that you can override the default profile, you can change the configuration per profile:

.. code-block:: yaml

# behat.yml
default:
testers:
stop_on_failure: true
strict: false

ci:
testers:
stop_on_failure: false
strict: true

This way, with the default profile behat will stop on failure and won't be strict, but will not stop and will be strict if the CI profile is selected.

You can force `--stop-on-failure` and `--strict` via CLI options to override configuration values.

Environment Variable - BEHAT_PARAMS
-----------------------------------

Expand Down