Closed delanym closed 1 year ago
You may tweak that via https://github.com/sormuras/junit-platform-maven-plugin#error-no-tests-found
Find more low-level tweaks here: https://github.com/sormuras/junit-platform-maven-plugin#plugin-configuration-tweaks
@sormuras but I do want it to fail if there are no tests, just not when there ARE tests and they're all disabled
Well, then this logic should be either a feature of a custom test plan listener or perhaps the JUnit Platform - I want this plugin to be a "dumb as possible", i.e. delegate to existing features of the Platform.
What the use-case of running an all-disabled test run, anyway?
It would be the same as for a no test run. The reason to make it fail is to get developers to write tests, right?
The reality is that tests get disabled (for whatever reason) and that should not cause the build to fail. Having the build pass with some tests disabled and fail with all tests disabled is surprising behaviour. I would vote for your ticket on Junit platform.
I would vote for your ticket on Junit platform.
Be our guest! 🤓 https://github.com/junit-team/junit5/issues/new/choose
When all tests are
@Disabled
the build should continue without raising a "No tests found" error.