friends-of-behat/suite-settings-extension

Allows to overwrite suites' default settings.

Installs: 204 454

Dependents: 63

Suggesters: 0

Stars: 102

Watchers: 4

Forks: 2

Open Issues: 0

Language:Gherkin

v1.0.1 2017-07-10 20:43 UTC

README

Allows to overwrite suites' default settings.

Usage

  1. Install it:

    $ composer require friends-of-behat/suite-settings-extension --dev
  2. Enable and configure default suite settings in your Behat configuration:

    # behat.yml
    default:
        # ...
        extensions:
            FriendsOfBehat\SuiteSettingsExtension: # the default configuration:
                paths:
                    - "features" # default one!
                contexts:
                    - "FeatureContext" # default one!
  3. Every suite you create will have those settings as the default ones.

Configuration reference

  • paths - an array, contains locations where Behat looks for *.feature files
  • contexts - an array, if there are no custom ones in suite configured, these are used

Protip!

If you've changed your paths, that they do not contain features anymore, your contexts may be not loaded properly. To ensure this, pass the same folder to built-in autoloader extension:

# behat.yml
default:
    # ...
    autoload:
        - "%paths.base%/custom_features/bootstrap" # features -> custom_features
    
    extensions:
        FriendsOfBehat\SuiteSettingsExtension:
            paths:
                - "custom_features"