Reputation: 2617
Jenkins marks good build as failure because of some unit test failed. If I run the build without unit test, I would get Build Success status. How can I configure Jenkins to do something like this:
Build success + Unit Tests fail --> Send out email notification with custom content like Build success + How many Unit Test Fail.
Build success + Unit Tests success --> Send out email notification saying both Build and Unit Tests success
Build fail --> Don't run Unit Tests --> Send out email notification on Build fail.
With my Email-ex setup now, I keep getting Build fail (good build) notification if the any unit test fail. I think Jenkins marks good build as failure because of test failed.
Upvotes: 4
Views: 4520
Reputation: 533
Are you using Maven to manage your project and its dependencies. If yes, you can provide the parameter -Dmaven.test.failure.ignore=true under Maven Project Configuration -> MAVEN_OPTS
Hope this will help you to achieve the functionality that the build will be success even if unit test cases are failing.
Upvotes: 1