Suite throws NoTestsDiscoveredException when all tests have been filtered #4100
-
We implemented a test engine (z2 Jupiter) that allows us to in-container tests. It's been in use for quite some time now and is useful only in context with the associated runtime environment (z2 - hence the name). It has been working nicely for Junit 4 and Junit 5 - but we are having trouble supporting @suite. Here is why - and it would be great to understand, if my thinking is wrong, or if Suite could be more friendly. The approach is basically like this:
No, this kind of also works with @suite in so far as tests are executed remotely but SuiteTestDescriptor in the end throws an exception because non of the tests if discovered (before our post discovery filter) were actually run locally (because we took over). Any suggestion on how to get around that would be great! Thanks, Henning |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Are you referring to this exception being thrown? If so, you can disable it by annotating your suite classes with |
Beta Was this translation helpful? Give feedback.
-
For The goal was to help detect misconfiguration of the suite Engine. This would cover the former case, the latter would presumably be intentional. And given that |
Beta Was this translation helpful? Give feedback.
Are you referring to this exception being thrown?
junit5/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/NoTestsDiscoveredException.java
Lines 19 to 21 in 6593317
If so, you can disable it by annotating your suite classes with
@Suite(failIfNoTests = false)
. Does that help?