I'm getting error HOOK-ERROR in before_all: KeyError: 'environment' when running behave from command line
Project Structure:
features/ * all feature files go here
features/steps * all steps go here
features/environment.py
behave.ini (at the project level)
[behave.userdata]
environment = int
environment.py
def before_all(context):
userdata = context.config.userdata
print(userdata)
print(userdata['environment'])
output
{}
HOOK-ERROR in before_all: KeyError: 'environment'
On a site note, if i run the features files using pycharm, I dont get this error and the environment printed out. Behave v1.2.6
Any help will be much appreciated