In case of @todo
tag I need to send a request to Zephyr Scale that the test is skipped.
def pytest_bdd_apply_tag(tag, function):
env = os.environ.get(ENV_VARIABLE)
if tag == 'todo':
marker = pytest.mark.skip(reason="Not implemented yet")
marker(function)
## Get issue number
# match = re.search(r'[([A-Z]+-[^]]+)]', scenario.name)
## Send request to Zephyr Scale
# ZephyrScale(match.group(1)).set_skipped()
return True
else:
# Fall back to the default behavior of pytest-bdd
return None
Is there any options to get Scenario name?