diff --git a/allure-behave/features/scenario.feature b/allure-behave/features/scenario.feature index 5038df59..6b2f8268 100644 --- a/allure-behave/features/scenario.feature +++ b/allure-behave/features/scenario.feature @@ -22,6 +22,30 @@ Feature: Scenario | undefined | broken | + Scenario: Skip steps after fail step + Given feature definition + """ + Feature: Scenario + + Scenario: Scenario with failed step in chain + Given passed step + Given failed step + Given broken step + """ + When I run behave with allure formatter + Then allure report has a scenario with name "Scenario with failed step in chain" + And this scenario has "failed" status + + And this scenario contains step "Given passed step" + And this step has "passed" status + + And this scenario contains step "Given failed step" + And this step has "failed" status + + And this scenario contains step "Given broken step" + And this step has "skipped" status + + Scenario: Scenario without name Given feature definition """ diff --git a/allure-behave/src/utils.py b/allure-behave/src/utils.py index e1793d57..b3636fa3 100644 --- a/allure-behave/src/utils.py +++ b/allure-behave/src/utils.py @@ -54,14 +54,14 @@ def scenario_tags(scenario): def scenario_status(scenario): for step in scenario.all_steps: - if step.status != 'passed': + if step_status(step) != 'passed': return step_status(step) return Status.PASSED def scenario_status_details(scenario): for step in scenario.all_steps: - if step.status != 'passed': + if step_status(step) != 'passed': return step_status_details(step)