Add detailed failed tests information to email sent from jenkins

1.8k views Asked by At

I had successfully configured jenkins build jobs send emails out with basic information in. The content is defined as:

Check console output at $BUILD_URL to view the results.

${FAILED_TESTS}

However, the ${FAILED_TESTS} only return the top-level information, e.g.

1 tests failed. FAILED: XXXMainTest.test Error Message: expected: but was: Stack Trace: java.lang.AssertionError: expected: but was: at test.XXXXTest.test(MainTest.java:27)

If I want to see detailed information thrown from the failed test, I need to click the link and click through each test suite until seeing the test failure information at every end.

Do you have any advice to add detailed tests information to email? Thanks.

1

There are 1 answers

0
S.Spieker On

I think you will find some help with this plugin: EMail-ext Plugin

New to version 2.15 is the ability to add attachments using the Ant pattern matching syntax used in many places in Jenkins. You can set a maximum total attachment size in the global configuration page, or it will be unlimited.