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

ConditionalOrdering does not evaluate number of parametrized tests #6

Open
augustindelecluse opened this issue Jan 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@augustindelecluse
Copy link
Collaborator

Problem

The following test class

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

    @Test
    @Order(1)
    public void test1() {
        
    }

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

    @ParameterizedTest
    @ValueSource(ints = {1, 2, 3})
    @Order(3)
    public void test3(int a) {

    }

}

Gives a grade of 0.33/1, because 3 tests are evaluated (failure of test2 makes the rest of the tests fails). However, without using the extension, a grade of 0.2/1 would be retrieved instead because 3 tests cases are actually run in test3.

Solution

Make the ConditionalOrderingExtension still evaluate the number of parametrized tests to run

@augustindelecluse augustindelecluse added the bug Something isn't working label Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant