Closed
Description
When I have Feature file like:
Feature: Foo
Background:
Given Step <bar>
@cool_background_tag
Examples:
|bar|
| 10|
@nice_background_tag
Examples:
|bar|
| 45|
Scenario Outline: Fizz
Given Step <buzz>
@bad_scenario_tag
Examples:
|buzz|
| 10|
@ugly_scenario_tag
Examples:
|buzz|
| 45|
and invoke pytest like:
# Runs Background only Examples for this tag:
pytest -m cool_background_tag
# Runs Scenario Outline only Examples for this tag:
pytest -m ugly_scenario_tag
# Other cases which also possible:
pytest -m "cool_background_tag and not bad_scenario_tag"
pytest -m "cool_background_tag or nice_background_tag"
pytest-bdd respects added tags
NB:
Gherkin parser already has such model and it already used here: https://behave.readthedocs.io/en/latest/new_and_noteworthy_v1.2.6.html#index-0
Metadata
Metadata
Assignees
Labels
No labels