Hi
This plugin:
https://github.com/jan-molak/jenkins-build-monitor-plugin
Post Groovy build:
def result = manager.build.testResultAction.result
def total = result.totalCount
def failed = result.failCount
manager.addShortText(failed + " / " + total + " failed")
Exception (class: http://javadoc.jenkins-ci.org/junit/hudson/tasks/junit/TestResultAction.html):
18:20:58 ERROR: Failed to evaluate groovy script.
18:20:58 java.lang.NullPointerException: Cannot get property 'result' on null object
18:20:58 at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
18:20:58 at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:172)
18:20:58 at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:47)
18:20:58 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
18:20:58 at Script1.run(Script1.groovy:1)
18:20:58 at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
18:20:58 at groovy.lang.GroovyShell.evaluate(GroovyShell.java:623)
18:20:58 at groovy.lang.GroovyShell.evaluate(GroovyShell.java:594)
18:20:58 at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript.evaluate(SecureGroovyScript.java:170)
18:20:58 at org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder.perform(GroovyPostbuildRecorder.java:362)
18:20:58 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
18:20:58 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
18:20:58 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
18:20:58 at hudson.model.Build$BuildExecution.post2(Build.java:185)
18:20:58 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
18:20:58 at hudson.model.Run.execute(Run.java:1753)
18:20:58 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
18:20:58 at hudson.model.ResourceController.execute(ResourceController.java:98)
18:20:58 at hudson.model.Executor.run(Executor.java:404)
Thanks
Jo