allure-python
allure-python copied to clipboard
Failed steps are marked as passed
I'm submitting a ...
- [x] bug report
- [ ] feature request
- [ ] support request => Please do not submit support request here, see note at the top of this template.
What is the current behavior?
Hello everyone I use python behave, I made it so that at this point the step is failed and a screen is made in the result, but that's why it is marked as passed and the next step after it is broken?
What is the expected behavior?
Failed steps are marked as failed
Please tell us about your environment:
- Allure version: 2.13.8
- Test framework: python behave
- Allure adaptor: pytest-allure-adaptor 1.7.10
Other information


@Thorzorr it's correct behavior.
all actions that solve the result of the step should be in
environment.py-> after_step ()
if step.status == Status.failed
context.app.base_page.get_screensot ()
Thank you very much!!!!
пт, 9 апр. 2021 г. в 07:57, Ljancek @.***>:
@Thorzorr https://github.com/Thorzorr it's correct behavior.
all actions that solve the result of the step should be in environment.py-> after_step ()
if step.status == Status.failed context.app.base_page.get_screensot ()
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/allure-framework/allure-python/issues/582#issuecomment-816403563, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATS67DKM2IY3I4RMVFDDOO3TH2CMJANCNFSM42TQVQBQ .
Thank you very much!!!! пт, 9 апр. 2021 г. в 07:57, Ljancek @.***>: … @Thorzorr https://github.com/Thorzorr it's correct behavior. all actions that solve the result of the step should be in environment.py-> after_step () if step.status == Status.failed context.app.base_page.get_screensot () — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#582 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATS67DKM2IY3I4RMVFDDOO3TH2CMJANCNFSM42TQVQBQ .
Is this solved? or can you share the code that solved the issue?
Could someone please confirm if they are going to fix this issue. I am facing the same issue while using allure with allure-pytest 2.9.43
Not a bug. If an exception is not reraised in the except block, then the step is passed. Either rethrow the exception:
@when("...")
def when_do_something(context):
try:
do_something()
except:
get_screenshot()
raise # <- note: the exception is reraised here
Or, as was suggested, move exception handling to after_step
(see comment above).