Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] ConditionalOrderingExtension only for subsequent ordering levels #3

Open
augustindelecluse opened this issue Jan 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@augustindelecluse
Copy link
Collaborator

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);
    }

}

@augustindelecluse augustindelecluse added the enhancement New feature or request label Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant