Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion allure-pytest-bdd/src/pytest_bdd_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from allure_commons.model2 import Label
from allure_commons.model2 import Status

from allure_commons.types import LabelType
from allure_commons.types import LabelType, AttachmentType
from allure_commons.utils import platform_label
from allure_commons.utils import host_tag, thread_tag
from allure_commons.utils import md5
Expand Down Expand Up @@ -115,6 +115,9 @@ def pytest_runtest_makereport(self, item, call):
test_result.status = status
test_result.statusDetails = status_details

if test_result.status != Status.PASSED and report.caplog:
self.attach_data(report.caplog, "log", AttachmentType.TEXT, None)

if report.when == 'teardown':
self.lifecycle.write_test_case(uuid=uuid)

Expand Down