-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for allure decorators and allyre.dynamic functions to allure-pytest-bdd #726
Comments
Wow, what an amazing and long awaiting feature here! |
Hi, I have tried some workarounds to add tags or modify the description. It seems to work In conftest.py: import pytest
from allure_pytest_bdd.pytest_bdd_listener import PytestBDDListener
from allure_commons import plugin_manager
from allure_commons.model2 import Label
from allure_commons.types import LabelType
@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_makereport(item, call):
outcome = yield
report = outcome.get_result()
if report.when == "call":
for plugin in plugin_manager.list_name_plugin():
p = plugin[1]
if isinstance(p, PytestBDDListener):
test_result = p.lifecycle._get_item()
# add tag to allure report
for marker in item.iter_markers():
test_result.labels.append(
Label(name=LabelType.TAG, value=marker.name)
)
# add epic to allure report
test_result.labels.append(
Label(name=LabelType.EPIC, value="This is epic")
)
# modify allure report description
test_result.description = "test description" |
Hello @delatrie, now is posible use the list of decorators or not? But I can´t see in the Allure-report. Help me please.!! |
Hello @delatrie |
Currently, only allure.attach and allure.attach.file functions are supported in allure-pytest-bdd. The following functions and decorators need to be supported as well:
@allure.title
decorator@allure.description
decorator@allure.description_html
decorator@allure.label
decorator@allure.severity
decorator@allure.epic
decorator@allure.feature
decorator@allure.story
decorator@allure.suite
decorator@allure.parent_suite
decorator@allure.sub_suite
decorator@allure.tag
decorator@allure.id
decorator@allure.manual
decorator@allure.link
decorator@allure.issue
decorator@allure.testcase
decoratorallure.dynamic.title
functionallure.dynamic.description
functionallure.dynamic.description_html
functionallure.dynamic.label
functionallure.dynamic.severity
functionallure.dynamic.epic
functionallure.dynamic.feature
functionallure.dynamic.story
functionallure.dynamic.tag
functionallure.dynamic.id
functionallure.dynamic.link
functionallure.dynamic.parameter
functionallure.dynamic.issue
functionallure.dynamic.testcase
functionallure.dynamic.suite
functionallure.dynamic.parent_suite
functionallure.dynamic.sub_suite
functionallure.dynamic.manual
functionThe text was updated successfully, but these errors were encountered: