Jenkins marks a good build as a failure due to a failed test

Can any expert help me on this. Jenkins is fine as a failure due to unit test error. If I ran the construct without a unit test, I would get a Build Success status. How can I configure Jenkins to do something like this:

1.) Build success + Invalid device tests → Send email notification with special content like Build Success + How many unit test Failed.

2.) Build success + Test block success -> Send an email notification stating that build and unit tests success

3.) Build Failure -> Don't Run Block Tests -> Send Email Notification of Build Failure.

With my email-ex setup, I now get a build failure notification (good build) if any unit test fails. I think Jenkins is great as a failure because the test failed. I would really appreciate it if someone could help me. Thank.

+3


source to share


1 answer


Are you using Maven to manage your project and its dependencies. If yes, you can specify -Dmaven.test.failure.ignore = true parameter under Maven Project Configuration -> MAVEN_OPTS



Hopefully this helps you achieve functionality that will be successful even if unit test errors don't work.

+1


source







All Articles