# -- HINT: EXECUTE: ../../bin/behave -f pretty

Feature: Use Soft Assertions in behave # features/soft_asserts.feature:1
  RELATED TO: https://github.com/behave/behave/discussions/1094
  Scenario: Failing with Soft Assertions -- CASE 1             # features/soft_asserts.feature:5
    Given a minimum number value of "5"                        # features/steps/number_steps.py:16
    Then the numbers "2" and "12" are in the valid range       # features/steps/number_steps.py:25
      Assertion Failed: soft assertion failures:
      1. Expected <2> to be greater than or equal to <5>, but was not.

    But note that "the step-2 (then step) is expected to fail" # None

  @behave.continue_after_failed_step
  Scenario: Failing with Soft Assertions -- CASE 2                # features/soft_asserts.feature:17
    Given a minimum number value of "5"                           # features/steps/number_steps.py:16
    Then the number "4" is in the valid range                     # features/steps/number_steps.py:21
      Assertion Failed: Expected <4> to be greater than or equal to <5>, but was not.

    And the number "8" is in the valid range                      # features/steps/number_steps.py:21
    But note that "the step-2 is expected to fail"                # ../../behave4cmd0/note_steps.py:15
    But note that "the step-3 should be executed and should pass" # ../../behave4cmd0/note_steps.py:15

  @behave.continue_after_failed_step
  Scenario: Failing with Soft Assertions -- CASE 1 and CASE 2     # features/soft_asserts.feature:28
    Given a minimum number value of "5"                           # features/steps/number_steps.py:16
    Then the number "2" is in the valid range                     # features/steps/number_steps.py:21
      Assertion Failed: Expected <2> to be greater than or equal to <5>, but was not.

    And the numbers "3" and "4" are in the valid range            # features/steps/number_steps.py:25
      Assertion Failed: soft assertion failures:
      1. Expected <3> to be greater than or equal to <5>, but was not.
      2. Expected <4> to be greater than or equal to <5>, but was not.

    And the number "8" is in the valid range                      # features/steps/number_steps.py:21
    But note that "the step-2 and step-3 are expected to fail"    # ../../behave4cmd0/note_steps.py:15
    But note that "the step-4 should be executed and should pass" # ../../behave4cmd0/note_steps.py:15

  Scenario: Passing                                                  # features/soft_asserts.feature:37
    Given a step passes                                              # ../../behave4cmd0/passing_steps.py:23
    And note that "this scenario should be executed and should pass" # ../../behave4cmd0/note_steps.py:15


Failing scenarios:
  features/soft_asserts.feature:5  Failing with Soft Assertions -- CASE 1
  features/soft_asserts.feature:17  Failing with Soft Assertions -- CASE 2
  features/soft_asserts.feature:28  Failing with Soft Assertions -- CASE 1 and CASE 2

0 features passed, 1 failed, 0 skipped
1 scenario passed, 3 failed, 0 skipped
11 steps passed, 4 failed, 1 skipped, 0 undefined
Took 0m0.001s
