Skip to content

[Feature] ConditionalOrderingExtension only for subsequent ordering levels #3

Open
@augustindelecluse

Description

@augustindelecluse

With ConditionalOrderedTest, the failure of test2a will prevent the execution of test2b. Another extension could only skip one level whenever a test from the previous level has failed. This would still allow test2b to run.

@ExtendWith(ConditionalOrderingExtension.class)
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@Grade
public class ConditionalOrderedTest {

    @Test
    @Order(1)
    public void test1() {
        System.out.println(1);
    }

    @Test
    @Order(2)
    public void test2a() {
        fail();
    }


    @Test
    @Order(2)
    public void test2b() {

    }

    @Test
    @Order(3)
    public void test3() {
        System.out.println(3);
    }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions