Следуя руководству по настройке поведения (https://behave.readthedocs.io/en/latest/tutorial.html), я получаю сообщение об ошибке ConfigError: No steps directory
.
Моя файловая структура:
VS Code/TestingAutomationPOC/
VS Code/TestingAutomationPOC/features/
VS Code/TestingAutomationPOC/features/steps/
VS Code/TestingAutomationPOC/features/steps/tutorial.py
VS Code/TestingAutomationPOC/feature/tutorial.feature
Установлено поведение (1.2.6) через pip.
Добавлено "python.linting.pylintArgs": ["--load-plugin","pylint_protobuf"]
в пользовательские настройки, что устранило мою проблему с импортом, но не помогло с этой ошибкой конфигурации.
От tutorial.py
:
from behave import *
@given('we have behave installed')
def step_impl(context):
pass
@when('we implement a test')
def step_impl(context):
assert True is not False
@then('behave will test it for us!')
def step_impl(context):
assert context.failed is False
От tutorial.feature
:
Feature: showing off behave
Scenario: run a simple test
Given we have behave installed
When we implement a test
Then behave will test it for us!
Что я делаю не так?
TestingAutomationPOC
и запустите оттудаbehave
? Я подозреваю, что вы запускаете команду поведения из каталога, отличного от того, в котором находится ваш файлfeatures
, и поведение не знает, где искать. - person Levi Noecker   schedule 27.08.2019