diff --git a/allure-robotframework/src/listener/robot_listener.py b/allure-robotframework/src/listener/robot_listener.py index 1da112c2..416d6f4d 100644 --- a/allure-robotframework/src/listener/robot_listener.py +++ b/allure-robotframework/src/listener/robot_listener.py @@ -13,7 +13,7 @@ from allure_commons.types import Severity from allure_commons.utils import platform_label from robot.libraries.BuiltIn import BuiltIn -from allure_robotframework.types import RobotKeywordType, RobotLogLevel +from allure_robotframework.types import RobotKeywordType, RobotLogLevel, RobotStatus from allure_robotframework import utils from allure_robotframework.allure_listener import AllureListener @@ -107,6 +107,8 @@ def start_new_test(self, name, attributes): def stop_current_test(self, name, attributes): uuid = self.stack.pop() test = self.reporter.get_test(uuid) + if 'skipped' in [tag.lower() for tag in attributes['tags']]: + attributes['status'] = RobotStatus.SKIPPED test.status = utils.get_allure_status(attributes.get('status')) test.labels.extend(utils.get_allure_suites(attributes.get('longname'))) diff --git a/allure-robotframework/src/listener/types.py b/allure-robotframework/src/listener/types.py index 888dfb52..5d05f1c0 100644 --- a/allure-robotframework/src/listener/types.py +++ b/allure-robotframework/src/listener/types.py @@ -1,6 +1,7 @@ class RobotStatus(object): FAILED = 'FAIL' PASSED = 'PASS' + SKIPPED = 'SKIP' class RobotKeywordType(object): diff --git a/allure-robotframework/src/listener/utils.py b/allure-robotframework/src/listener/utils.py index ec4a717f..22385bce 100644 --- a/allure-robotframework/src/listener/utils.py +++ b/allure-robotframework/src/listener/utils.py @@ -5,8 +5,12 @@ def get_allure_status(status): - return Status.PASSED if status == RobotStatus.PASSED else Status.FAILED - + if status == RobotStatus.PASSED: + return Status.PASSED + elif status == RobotStatus.SKIPPED: + return Status.SKIPPED + else: + return Status.FAILED def get_allure_parameters(parameters): return [Parameter(name="arg{}".format(i + 1), value=param) for i, param in enumerate(parameters)]