Skip to content

Inconclusive Steps are being marked as PASSED in Report Portal #56

@praffulv-kb4

Description

@praffulv-kb4

name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''


Describe the bug
Recently we moved to python latest packages 3.14 and also behave was too updated, and before that all inconclusive tests were Failed and we were able to identify them. but with some of the recent changes, the status is Marked as PASSED whenever there is Inconclusive Step, which also can include a step being missed from the RP run but the overall run Marked as PASSED, which should not be the case!

Steps to Reproduce
Steps to reproduce the behavior:

  1. Mark the step as inconclusive in the step
  2. Report portal is mapped with PASSED status for the same

Expected behavior
Tests are inconclusive even when a step is skipped, and this is a clear failure in Scenario

Actual behavior
Due to Fallback logic, Inconclusive result is being marked as PASSED in the Report portal

Package versions
behave 1.2.7

Additional context
The issue is in behave_agent.py:510-528 in the convert_to_rp_status() method:

  @staticmethod
  def convert_to_rp_status(behave_status: str) -> str:
      """Convert behave test result status to ReportPortal status."""
      if behave_status == "passed":
          return "PASSED"
      elif behave_status == "failed":
          return "FAILED"
      elif behave_status == "skipped":
          return "SKIPPED"
      elif behave_status == "error":
          return "FAILED"
      else:
          # todo define what to do
          return "PASSED"  # CRITICAL BUG: Unknown statuses default to PASSED

  The Problem: Any unrecognized status value defaults to "PASSED" (line 528). This means if behave introduces new status types, or if there's any unexpected status value, it will be incorrectly reported as passed in Report Portal.

Recent History

  Looking at the recent commits, there was already one fix for this exact issue:
  - Commit 7f5b721 (Dec 2025): Added handling for "error" status introduced in behave 1.2.7
  - Before this fix, "error" statuses were falling through to the else clause and being marked as PASSED

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions