From 570a119b0773344b54c7e3ed7e70a61da9f088c6 Mon Sep 17 00:00:00 2001 From: Jaime del Rey Date: Wed, 3 Feb 2021 16:50:41 +0100 Subject: [PATCH] Add execution info for non-Exception scenario --- allure-pytest/src/listener.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/allure-pytest/src/listener.py b/allure-pytest/src/listener.py index b7da35c8..9951918e 100644 --- a/allure-pytest/src/listener.py +++ b/allure-pytest/src/listener.py @@ -180,6 +180,11 @@ def pytest_runtest_makereport(self, item, call): and not (call.excinfo.errisinstance(AssertionError) or call.excinfo.errisinstance(pytest.fail.Exception))): status = Status.BROKEN + else: + if report.longrepr: + status_details = StatusDetails( + message="Test Execution Details", + trace=escape_non_unicode_symbols(report.longreprtext)) if status == Status.PASSED and hasattr(report, 'wasxfail'): reason = report.wasxfail