Skip to content

Suite throws NoTestsDiscoveredException when all tests have been filtered #4100

Answered by marcphilipp
hblohm asked this question in Q&A
Discussion options

You must be logged in to vote

Are you referring to this exception being thrown?

https://github.com/junit-team/junit5/blob/6593317c15fb556febbde11914fa7afe00abf8cd/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/NoTestsDiscoveredException.java#L19-L21

If so, you can disable it by annotating your suite classes with @Suite(failIfNoTests = false). Does that help?

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@hblohm
Comment options

@hblohm
Comment options

Answer selected by hblohm
Comment options

You must be logged in to vote
3 replies
@hblohm
Comment options

@mpkorstanje
Comment options

@hblohm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants