Closed AmirYa412 closed 1 year ago
I encountered the same issue. I will keep an eye on it. next is the structure of my projects:
`
features: | -- test.feature | -- conftest.py: import all the functions from 3 test_steps py files | -- steps_def
| -- test_step1.py | -- test_step2.py | -- test_step3.py`
my problem is: when the project has 3 test_step.py files, the report is: 3 passed, 18 deselected, 2 warnings but if I remove test_step3.py, and run the case again, the report is: 2 passed, 12 deselected, 2 warnings
I found you have already closed the issue. so could you tell me how to resolve this issue? thanks a lot!!
I am working on a refactoring a project from Behave to pytest-bdd. Structure looks like this:
We have an internal Driver we initialise in
conftest.py
Intest_article.py
I have steps that can be related to all features, "common steps". I want to use defined steps freely in feature files, and use theirtarget_fixture
between other steps files.I noticed few issues that stopping us from fully moving to pytest-bdd:
test_publish.py
steps or target_fixtures fromtest_article.py
will collect the same scenario twice, in report I see the same scnario running fromtest_aritcle.py
andtest_publish.py
.conftest.py
, but is it really optimal? It will eventually create a really bigconftest.py
files, which I believe should contain configurations and not test related functions.test_publish.py
and define the target_fixtures inconftest.py
, I am getting:pytest_bdd.exceptions.StepDefinitionNotFoundError
when running masks.feature.conftest.py
- a fixture calledcontext
and pass it throughout the tests - but that's the reason we are moving from Behave - we don't want to usecontext
.