2

I have continuous integration setup using jenkins and also integrated selenium scripts for nightly build. I also have editable email notification for sending emails in case of any build failure.

The default content for editable email notification is

$DEFAULT_CONTENT

${JELLY_SCRIPT,template="text"}

${FAILED_TESTS}

This content give me clear picture if there is any fail in the selenium script with full stacktrace.

The problem is that, if the jenkins build got failed due to compile error or any other failure reasons, the email notification is not providing any reason about the failure. It simply says No tests ran.

How to make jenkins to send mail notification with the failure reason, if the build got failed due to compile time error ?

Community
  • 1
  • 1
Jugi
  • 1,244
  • 3
  • 23
  • 51

3 Answers3

0

You can attach build logs and any reports that your selenium has producing with the editable email notification.

Below is a screenshot of what you can do: enter image description here

Attached Logs can give you Info on build failure and other details And reports can be customized as you need.
More links:

Community
  • 1
  • 1
Chandan Nayak
  • 10,117
  • 5
  • 26
  • 36
  • hi chandan. thanks for the response. i would like to include the failure reason in the mail content itself instead of attaching the complete build log – Jugi Jul 14 '15 at 06:18
  • Not sure, how you want to pinpoint on the failure of the selenium suite, a report is much more reliable to do that, you can add git commit logs on this particular build in the email and you can trigger different mail on build failure to narrow down the failure reason. – Chandan Nayak Jul 14 '15 at 06:32
0

You can create two jobs , one is for triggering build for every check and one for running automation suite.

It may resolve your problem

Raghav N
  • 201
  • 1
  • 6
0

You can try using this plugin https://wiki.jenkins-ci.org/display/JENKINS/Build+Failure+Analyzer

Ashish Musale
  • 839
  • 10
  • 15