x***@gmail.com
2018-10-25 07:18:32 UTC
we use using mail-ext and robot frame work to try to format all test suits
detail in jenkins, and send out the report.
we are using jenkins pipeline project, and robot test result can be shown
on build UI web page.
we used now, its downloaded from github,
https://github.com/JMcn/jenkins-email-ext-templates/blob/master/robot.groovy.
to try to format test detail in email.
we can get email but content has following exception with following piece
of groovy script, any idea for this. thanks a lot, as it block us for days.
<!-- Robot Framework Results -->
<%
def robotResults = false
def actions = build.actions // List<hudson.model.Action>
actions.each() { action ->
if( action.class.simpleName.equals("RobotBuildAction") ) { //
hudson.plugins.robot.RobotBuildAction
robotResults = true %>
Exception raised during template rendering: Cannot get property
'simpleName' on null object java.lang.NullPointerException: Cannot get
property 'simpleName' on null object at
org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60) at
org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174)
at
org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:47)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
at
SimpleTemplateScript16$_run_closure1.doCall(SimpleTemplateScript16.groovy:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at
groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at
groovy.lang.Closure.call(Closure.java:414) at
groovy.lang.Closure.call(Closure.java:430) at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2040)
at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2025)
at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2066)
at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source) at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at SimpleTemplateScript16.run(SimpleTemplateScript16.groovy:36) at
groovy.text.SimpleTemplateEngine$SimpleTemplate$1.writeTo(SimpleTemplateEngine.java:168)
at
groovy.text.SimpleTemplateEngine$SimpleTemplate$1.toString(SimpleTemplateEngine.java:180)
at
hudson.plugins.emailext.plugins.content.ScriptContent.renderTemplate(ScriptContent.java:151)
at
hudson.plugins.emailext.plugins.content.ScriptContent.evaluate(ScriptContent.java:82)
at
org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.evaluate(DataBoundTokenMacro.java:208)
at org.jenkinsci.plugins.tokenmacro.Parser.processToken(Parser.java:308) at
org.jenkinsci.plugins.tokenmacro.Action$KiHW1UeqOdqAwZul.run(Unknown
Source) at
org.parboiled.matchers.ActionMatcher.match(ActionMatcher.java:96) at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46) at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.matchers.FirstOfMatcher.match(FirstOfMatcher.java:41) at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.matchers.FirstOfMatcher.match(FirstOfMatcher.java:41) at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.matchers.ZeroOrMoreMatcher.match(ZeroOrMoreMatcher.java:39)
at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46) at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.parserunners.BasicParseRunner.run(BasicParseRunner.java:72)
at
org.parboiled.parserunners.ReportingParseRunner.runBasicMatch(ReportingParseRunner.java:86)
at
org.parboiled.parserunners.ReportingParseRunner.run(ReportingParseRunner.java:66)
at
org.parboiled.parserunners.AbstractParseRunner.run(AbstractParseRunner.java:81)
at
org.parboiled.parserunners.AbstractParseRunner.run(AbstractParseRunner.java:76)
at org.jenkinsci.plugins.tokenmacro.Parser.process(Parser.java:68) at
org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:204) at
org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:234)
at
hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:80)
at
hudson.plugins.emailext.ExtendedEmailPublisher.addContent(ExtendedEmailPublisher.java:880)
at
hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:753)
at
hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:451)
at
hudson.plugins.emailext.EmailExtStep$EmailExtStepExecution.run(EmailExtStep.java:224)
at
hudson.plugins.emailext.EmailExtStep$EmailExtStepExecution.run(EmailExtStep.java:163)
at
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:290) at
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
detail in jenkins, and send out the report.
we are using jenkins pipeline project, and robot test result can be shown
on build UI web page.
we used now, its downloaded from github,
https://github.com/JMcn/jenkins-email-ext-templates/blob/master/robot.groovy.
to try to format test detail in email.
we can get email but content has following exception with following piece
of groovy script, any idea for this. thanks a lot, as it block us for days.
<!-- Robot Framework Results -->
<%
def robotResults = false
def actions = build.actions // List<hudson.model.Action>
actions.each() { action ->
if( action.class.simpleName.equals("RobotBuildAction") ) { //
hudson.plugins.robot.RobotBuildAction
robotResults = true %>
Exception raised during template rendering: Cannot get property
'simpleName' on null object java.lang.NullPointerException: Cannot get
property 'simpleName' on null object at
org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60) at
org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174)
at
org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:47)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
at
SimpleTemplateScript16$_run_closure1.doCall(SimpleTemplateScript16.groovy:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at
groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at
groovy.lang.Closure.call(Closure.java:414) at
groovy.lang.Closure.call(Closure.java:430) at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2040)
at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2025)
at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2066)
at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source) at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at SimpleTemplateScript16.run(SimpleTemplateScript16.groovy:36) at
groovy.text.SimpleTemplateEngine$SimpleTemplate$1.writeTo(SimpleTemplateEngine.java:168)
at
groovy.text.SimpleTemplateEngine$SimpleTemplate$1.toString(SimpleTemplateEngine.java:180)
at
hudson.plugins.emailext.plugins.content.ScriptContent.renderTemplate(ScriptContent.java:151)
at
hudson.plugins.emailext.plugins.content.ScriptContent.evaluate(ScriptContent.java:82)
at
org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.evaluate(DataBoundTokenMacro.java:208)
at org.jenkinsci.plugins.tokenmacro.Parser.processToken(Parser.java:308) at
org.jenkinsci.plugins.tokenmacro.Action$KiHW1UeqOdqAwZul.run(Unknown
Source) at
org.parboiled.matchers.ActionMatcher.match(ActionMatcher.java:96) at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46) at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.matchers.FirstOfMatcher.match(FirstOfMatcher.java:41) at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.matchers.FirstOfMatcher.match(FirstOfMatcher.java:41) at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.matchers.ZeroOrMoreMatcher.match(ZeroOrMoreMatcher.java:39)
at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46) at
org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at
org.parboiled.parserunners.BasicParseRunner.run(BasicParseRunner.java:72)
at
org.parboiled.parserunners.ReportingParseRunner.runBasicMatch(ReportingParseRunner.java:86)
at
org.parboiled.parserunners.ReportingParseRunner.run(ReportingParseRunner.java:66)
at
org.parboiled.parserunners.AbstractParseRunner.run(AbstractParseRunner.java:81)
at
org.parboiled.parserunners.AbstractParseRunner.run(AbstractParseRunner.java:76)
at org.jenkinsci.plugins.tokenmacro.Parser.process(Parser.java:68) at
org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:204) at
org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:234)
at
hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:80)
at
hudson.plugins.emailext.ExtendedEmailPublisher.addContent(ExtendedEmailPublisher.java:880)
at
hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:753)
at
hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:451)
at
hudson.plugins.emailext.EmailExtStep$EmailExtStepExecution.run(EmailExtStep.java:224)
at
hudson.plugins.emailext.EmailExtStep$EmailExtStepExecution.run(EmailExtStep.java:163)
at
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:290) at
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9bb19718-888a-4738-9239-fecbeebcf1e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9bb19718-888a-4738-9239-fecbeebcf1e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.