Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send Jenkins notification only when new test fails

I have Jenkins project that perform some sort of sanity check on couple of independent documents. Check result is written in JUnit XML format.

When one document test fails, entire build fails. Jenkins can be simply configured to send email to commiter in this situation. But I want to notify commiters only when new test failed or any failed test was fixed with the commit. They are not interested in failed tests for documents they have not edited. Email should contain only information of changes in tests, not full test report. Is it possible to send this kind of notification with any currently available Jenkins plugins? What could be the simplest way to achieve this?

like image 544
jinowolski Avatar asked Feb 09 '12 20:02

jinowolski


1 Answers

I had the same question today. I wanted to configure Jenkins sending notifications only when new tests fail. What I did was to install email-ext plugin.

You can find there a special trigger that is called Regression (An email will be sent any time there is a regression. A build is considered to regress whenever it hasmore failures than the previous build.)

Regarding fixed tests, there is Improvement trigger (An email will be sent any time there is an improvement. A build is considered to have improved wheneverit has fewer failures than the previous build.)

I guess that this is what you are looking for.

Hope it helps

like image 92
alexandros Avatar answered Oct 26 '22 06:10

alexandros