Skip to content

Commit

Permalink
fix robot step status on not executed steps (fixes #678, via #687)
Browse files Browse the repository at this point in the history
  • Loading branch information
skhomuti authored Sep 15, 2022
1 parent 481ea54 commit 78fc95f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions allure-robotframework/examples/status/status.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
Failed Test Case With Python Traceback
Set Log Level DEBUG
Fail With Traceback Fail message
Failed Test Case With Not Executed Step
Fail
Log This step should be skipped
2 changes: 2 additions & 0 deletions allure-robotframework/src/listener/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ class RobotStatus(object):
FAILED = 'FAIL'
PASSED = 'PASS'
SKIPPED = 'SKIP'
NOT_RUN = 'NOT RUN'
NOT_SET = 'NOT SET'


class RobotKeywordType(object):
Expand Down
2 changes: 1 addition & 1 deletion allure-robotframework/src/listener/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def get_allure_status(status):
if status == RobotStatus.PASSED:
return Status.PASSED
elif status == RobotStatus.SKIPPED:
elif status in (RobotStatus.SKIPPED, RobotStatus.NOT_RUN, RobotStatus.NOT_SET):
return Status.SKIPPED
else:
return Status.FAILED
Expand Down
7 changes: 7 additions & 0 deletions allure-robotframework/test/status/status.robot
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ Failed Test Case With Python Traceback
Should Has Status Detail With Traceback ${test_case} fail_with_traceback\n${SPACE * 4}BuiltIn().fail(traceback_message)
${step} Should Has Step ${test_case} status_library.Fail With Traceback
Should Has Status ${step} failed

Failed Test Case With Not Executed Step
${allure_report} Run Robot With Allure examples/status/status.rst
${test_case} Should Has Test Case ${allure_report} Failed Test Case With Not Executed Step
Should Has Status ${test_case} failed
${step} Should Has Step ${test_case} BuiltIn.Log
Should Has Status ${step} skipped

0 comments on commit 78fc95f

Please sign in to comment.