Skip to content

🐞: setStatus not updated status and stopStep destroys nesting of steps #1133

Closed

Description

@VaXoID55

What happened?

Example Test:

public class MyTest {
    @Rule
    public Timeout globalTimeout = new Timeout(10, TimeUnit.MINUTES);

    @Test
    @DisplayName("ExampleTestName")
    public void MyTes_1() {
        simpleStep();
    }

    @Step("Inner step")
    private void innerStep(boolean result) {
        Utils.sleep(200);
        StepUtils.setStepStatus(result);
    }

    @Step("Outer step")
    public void simpleStep() {
        step("Simple step");
        step("Simple step with status", Status.FAILED);
        innerStep(true);
        innerStep(false);
        innerStep(true);
        innerStep(false);
    }
}

If use setStepStatus as:

public static boolean setStepStatus(boolean status) {
    if (!status) {
        Allure.getLifecycle().updateStep(result ->
                result.setStatus(Status.FAILED));
        Allure.getLifecycle().stopStep();
    }
    return status;
}

then all nested steps after FAILED cease to be nested, but status step set correctly:
image
If use setStepStatus as (without stopStep()):

public static boolean setStepStatus(boolean status) {
    if (!status) {
        Allure.getLifecycle().updateStep(result ->
                result.setStatus(Status.FAILED));
    }
    return status;
}

the nesting of steps is correct, but the status is not set to FILED
image

What Allure Integration are you using?

allure-junit4

What version of Allure Integration you are using?

2.29.0

What version of Allure Report you are using?

2.29.0

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added theissue type on Jul 10, 2026
  2. removed
    pr:bugSomething isn't working
    on Jul 10, 2026
  3. added a commit that references this issue on Jul 29, 2026
    ad8d68d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions