E-mail notification if total test # decreases or total tests passed decreases

186 views
Skip to first unread message

sarchule

unread,
Mar 9, 2012, 5:26:06 PM3/9/12
to jenkins...@googlegroups.com
I ran into a situation today where a unit test (MSTest) timed out. This was not counted as a failure and looking at the "Latest Test Result" table, it was not obvious that anything was wrong. This table lists failures, skipped, and total test columns, but the stats looked no different than any other run. Therefore, I'd like to set up a mechanism such that if the total # tests decreases (e.g., someone has inadvertently removed tests) or if the total # of successful tests has decreased (e.g., the timeout situation above), it will send an e-mail notification.

Is there a straightforward way to do this for the currently running job? I was thinking of using the remote API to grab the test stats, but it doesn't seem like I can do this within the current job. Is it possible to do this using a post-build step (perhaps using some post-build plugin) or do I need to set up a downstream job which can process the test stats from the upstream job?

Regards,
Steve

Noah Hoffman

unread,
Mar 9, 2012, 8:08:13 PM3/9/12
to jenkins...@googlegroups.com
Hi All,

     We're starting to see a few random slave-agent disconnects and I'm wondering if anyone has any info.  A search online doesn't reveal anything useful nor do the Jenkins logs or System logs.   We're running Jenkins build 1.448 hosted on a Linux machine, the node is OSX 10.6.8.

Thanks in advance,
Noah



FATAL: channel is already closed
hudson.remoting.ChannelClosedException: channel is already closed
	at hudson.remoting.Channel.send(Channel.java:499)
	at hudson.remoting.Request.call(Request.java:110)
	at hudson.remoting.Channel.call(Channel.java:681)
	at hudson.EnvVars.getRemote(EnvVars.java:202)
	at hudson.model.Computer.getEnvironment(Computer.java:828)
	at hudson.model.Run.getEnvironment(Run.java:1849)
	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:819)
	at org.jenkinsci.plugins.tokenmacro.impl.EnvironmentVariableMacro.evaluate(EnvironmentVariableMacro.java:23)
	at org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.evaluate(DataBoundTokenMacro.java:177)
	at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:160)
	at org.jenkinsci.plugins.buildnamesetter.BuildNameSetter.setDisplayName(BuildNameSetter.java:47)
	at org.jenkinsci.plugins.buildnamesetter.BuildNameSetter.access$000(BuildNameSetter.java:23)
	at org.jenkinsci.plugins.buildnamesetter.BuildNameSetter$1.tearDown(BuildNameSetter.java:39)
	at hudson.model.Build$RunnerImpl.doRun(Build.java:150)
	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:470)
	at hudson.model.Run.run(Run.java:1404)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:238)
Caused by: java.io.IOException: Unexpected termination of the channel
	at hudson.remoting.Channel$ReaderThread.run(Channel.java:1133)
Caused by: java.io.EOFException
	at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2553)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1296)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
	at hudson.remoting.Channel$ReaderThread.run(Channel.java:1127)

Dirk Kuypers

unread,
Mar 10, 2012, 9:02:19 AM3/10/12
to jenkins...@googlegroups.com
Hi,

not exactly what you are searching for, but maybe your requirement
could be integrated in the email-ext plugin, too.
https://issues.jenkins-ci.org/browse/JENKINS-3430

Maybe this gets faster into the official releases if you vote for this
ticket, too.

Dirk

2012/3/9 sarchule <sarc...@gmail.com>:

--
Never trust a short-haired guru

Sami Tikka

unread,
Mar 10, 2012, 1:04:05 PM3/10/12
to jenkins...@googlegroups.com
What type of slave is this?

-- Sami

Mark Streit

unread,
Mar 10, 2012, 1:58:51 PM3/10/12
to jenkins...@googlegroups.com
This is not the SAME thing but similar,  we have had numerous issues with the CLI disconnecting and have a JIRA item opened on this already:

https://issues.jenkins-ci.org/browse/JENKINS-12037

There are numerous comments in the thread of that one.
 Mark

Slide

unread,
Mar 10, 2012, 4:30:49 PM3/10/12
to jenkins...@googlegroups.com
That ticket should be closed, the patch was applied to email-ext
--
Website: http://earl-of-code.com

Dirk Kuypers

unread,
Mar 12, 2012, 5:23:10 AM3/12/12
to jenkins...@googlegroups.com
Hi,

cool, you are right! I didn't notice that there is now an improvement
and regression trigger in the configuration section of the email
extension plugin.

Thanks for integrating!
Best regards
Dirk

2012/3/10 Slide <slide...@gmail.com>:

sarchule

unread,
Mar 12, 2012, 1:05:52 PM3/12/12
to jenkins...@googlegroups.com
Nice idea, but, unfortunately, the regression trigger doesn't quite solve the original problem. In my case, I need the regression trigger to kick-in if the total number of passes decreases rather than the total number of failures increasing (since the failure count remained the same in my scenario). Perhaps I can request an enhancement to the enhancement....

Steve

Slide

unread,
Mar 12, 2012, 1:28:51 PM3/12/12
to jenkins...@googlegroups.com
Please do.

slide
Reply all
Reply to author
Forward
0 new messages