Skip to content

Commit 78fc95f

Browse files
authored
fix robot step status on not executed steps (fixes #678, via #687)
1 parent 481ea54 commit 78fc95f

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

allure-robotframework/examples/status/status.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@
1515
Failed Test Case With Python Traceback
1616
Set Log Level DEBUG
1717
Fail With Traceback Fail message
18+
19+
Failed Test Case With Not Executed Step
20+
Fail
21+
Log This step should be skipped

allure-robotframework/src/listener/types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ class RobotStatus(object):
22
FAILED = 'FAIL'
33
PASSED = 'PASS'
44
SKIPPED = 'SKIP'
5+
NOT_RUN = 'NOT RUN'
6+
NOT_SET = 'NOT SET'
57

68

79
class RobotKeywordType(object):

allure-robotframework/src/listener/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
def get_allure_status(status):
1010
if status == RobotStatus.PASSED:
1111
return Status.PASSED
12-
elif status == RobotStatus.SKIPPED:
12+
elif status in (RobotStatus.SKIPPED, RobotStatus.NOT_RUN, RobotStatus.NOT_SET):
1313
return Status.SKIPPED
1414
else:
1515
return Status.FAILED

allure-robotframework/test/status/status.robot

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,10 @@ Failed Test Case With Python Traceback
2828
Should Has Status Detail With Traceback ${test_case} fail_with_traceback\n${SPACE * 4}BuiltIn().fail(traceback_message)
2929
${step} Should Has Step ${test_case} status_library.Fail With Traceback
3030
Should Has Status ${step} failed
31+
32+
Failed Test Case With Not Executed Step
33+
${allure_report} Run Robot With Allure examples/status/status.rst
34+
${test_case} Should Has Test Case ${allure_report} Failed Test Case With Not Executed Step
35+
Should Has Status ${test_case} failed
36+
${step} Should Has Step ${test_case} BuiltIn.Log
37+
Should Has Status ${step} skipped

0 commit comments

Comments
 (0)