Skip to content

Test nesting doesn't work #1234

@LiGeten

Description

@LiGeten

Describe the Bug

parent test and sub test are not displayed correctly structure is not preserved

Steps to Reproduce

@DisplayName("A customer object")
class DAOTest {

@Test
@DisplayName("can be created with the dao")
void canBeCreated() {  }

@Nested
@DisplayName("when created")
class WhenCreated {

    Customer customer;

    @BeforeEach
    void setup() { }

    @Test @DisplayName("it must be saved to the dao")
    void mustBeSaved() { }

    @Nested @DisplayName("after saving a customer")
    class AfterSaving {

        @BeforeEach
        void setup() { }

        @Test @DisplayName("it can be fetched from the dao")
        void canBeFetched() {  }

        @Test @DisplayName("it cannot be deleted by wrong id")
        void cannotBeDeletedByWrongId() {

        }
    }
}

}

Expected Behaviour

nesting of tests must be preserved

Screenshots or Additional Context

https://www.dropbox.com/scl/fi/3iz810yl2tl8etserqv1f/18-01-2025-111136.jpg?rlkey=g7b7oqseqt0s70z07dc9l9m7o&dl=0
https://www.dropbox.com/scl/fi/noj0izhgxfvk166cotfhm/18-01-2025-112540.jpg?rlkey=4p5j69xm0q3rlyqr7t37xiakw&dl=0

What Language are you using?

Java

What Framework/Allure Integration you are using?

allure-junit5

What version of Allure Integration you are using?

2.26.0

What version of Allure Report you are using?

2.32.0

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions