Handle Behave “error” Status as FAILED in ReportPortal#55
Conversation
WalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
behave_reportportal/behave_agent.py (1)
524-525: Mapping Behave"error"toFAILEDlooks correct; consider broader consistencyThe new
"error" -> "FAILED"mapping aligns with the PR goal and fixes the prior issue where"error"fell into the default"PASSED"branch. That part looks good.As a follow-up, you may want to check whether Behave 1.2.7 surfaces
"error"viastatus.namein other places where this file currently special-cases only"failed"(e.g.,finish_scenario,_finish_step_step_based,_finish_step_scenario_based). If"error"is a distinct status there as well, you might want to treat it like"failed"for exception logging and any other failure-specific handling to keep behavior consistent across the integration. This is an enhancement, not a blocker for this change.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #55 +/- ##
===========================================
- Coverage 99.45% 99.18% -0.27%
===========================================
Files 3 3
Lines 366 368 +2
===========================================
+ Hits 364 365 +1
- Misses 2 3 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Handle Behave “error” Status as FAILED in ReportPortal (Introduced in Behave 1.2.7)
Behave 1.2.7 introduced a new result status called error, but ReportPortal doesn’t automatically interpret it.
Because of this, any scenario marked as error was previously reported as PASSED.
This update ensures that Behave’s error status is correctly mapped to FAILED in ReportPortal, preventing false positives and improving result accuracy.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.