allure-python icon indicating copy to clipboard operation
allure-python copied to clipboard

Mark high level step as failed if low level step with soft check failed

Open provider161 opened this issue 1 year ago • 2 comments

I'm submitting a ...

  • [x] feature request

What is the current behavior?

If there is a low level step with failed soft check, high level step marked green.

Code:

from pytest_check import check as soft_check
from allure import step


def test_soft_checks():

    with step("High level step"):

        with soft_check, step("1st low level step"):

            assert False

        with soft_check, step("2nd low level step"):

            assert True

What we got in report:

high level step is green

Снимок экрана 2024-09-12 в 17 07 25

What is the expected behavior?

high level step is red

Please tell us about your environment:

  • Allure version: 2.22.1
  • Test framework: pytest==7.4.0
  • Allure adaptor: allure-pytest==2.13.1

provider161 avatar Sep 12 '24 14:09 provider161

@provider161, thank you for the detailed feature request description! @delatrie, hi! I’ve tried to implement it in my PR, pls review.

sharovd avatar Apr 10 '25 11:04 sharovd

@delatrie Hi! Check the PR, please.

provider161 avatar May 22 '25 07:05 provider161

@delatrie hi:)

provider161 avatar Dec 23 '25 08:12 provider161