11

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?

2 Answers 2

18

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

2
  • 1
    The edge case of some tests that used to fail being replaced by newly failing tests would not be detected, but that's already a useful information! Mar 17, 2014 at 9:01
  • 1
    @XavierNodet - This issue is fixed by email-ext plugin from version 2.39 release, see following defect for more information issues.jenkins-ci.org/browse/JENKINS-22041
    – Hemant
    Feb 18, 2015 at 2:34
0

There's the email-ext plugin. I don't think it does exactly what you want (e.g. sending only emails to committers who have changed a file that is responsible for a failure). You might be able to work around that/extend the plugin though.

Also have a look at the new Emailer, which talks about new email functionality in core hudson that is based on aforementioned plugin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.