Configure TestNG to fail when all tests are skipped #2258
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #217
Currently TestNG doesn’t throw an exception which
build tools can leverage to fail a build, when all
the “@test” methods get skipped and nothing was run.
TestNG returns the proper status, but sometimes
build tools may not be reading that status and take
appropriate action.
Introduced a new configuration through this PR using
which a user can instruct TestNG itself to trigger
an exception when no tests were executed.
If one is using surefire plugin, then your surefire
plugin configuration would look like below:
If you are using command line, then this feature
can be turned on by passing
-failwheneverythingskipped=true
Fixes #217 .
Did you remember to?
CHANGES.txt