Skip to content

Undividable Test Units #87

@Vampire

Description

@Vampire

I'm sorry if this is not an issue with JUnit 5, but I'm not sure what the point with the old logic was, so I'm not sure how to test whether it is a problem.

In the JUnit 4 test unit finder, there is some logic to not have one test unit per test method if there are certain conditions like if there is a BeforeClass or AfterClass annotation or if there is a class rule applied to a method or field.

In the JUnit 5 codebase I have not seen such code but it seems it is always split into the leaf tests.

Whatever was the cause for that code for JUnit 4, I'd guess it is also necessary for Jupiter or Spock (where I had a PR open for the JUnit 4 based Spock 1.x, as PIT just never split Spock specifications.)

Or is the situation different here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions