Note that there are some explanatory texts on larger screens.

plurals
  1. POGroovyTemplate of test runner throws exceptions and won't show error detail
    text
    copied!<p>Sometimes when a scalatest fails, Play test framework does not report the cause of the failure, instead I see the following. Any ideas why? Reporter completed abruptly with an exception after receiving event: </p> <pre><code>TestFailed(org.scalatest.events.Ordinal@6db,java.util.NoSuchElementException,AsgUpdateActorTest,Some(com.netflix.tachyon.nac.AsgUpdateActorTest),parse xml,Some(java.util.NoSuchElementException),Some(42),None,Some(&lt;function7&gt;),None,play-thread-1,1324496590792). java.lang.NullPointerException at play.test.TestEngine$TestResults.add(TestEngine.java:191) at org.scalatest.tools.PlayReporter.apply(ScalaTestRunner.scala:122) at org.scalatest.DispatchReporter$$anonfun$1$$anonfun$apply$1$$anonfun$apply$2.apply(DispatchReporter.scala:152) at org.scalatest.DispatchReporter$$anonfun$1$$anonfun$apply$1$$anonfun$apply$2.apply(DispatchReporter.scala:151) at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61) at scala.collection.immutable.List.foreach(List.scala:45) at org.scalatest.DispatchReporter$$anonfun$1$$anonfun$apply$1.apply(DispatchReporter.scala:151) at org.scalatest.DispatchReporter$$anonfun$1$$anonfun$apply$1.apply(DispatchReporter.scala:101) at scala.actors.Actor$class.receive(Actor.scala:524) at scala.actors.Actor$$anon$1.receive(Actor.scala:134) at scala.actors.Actor$.receive(Actor.scala:189) at org.scalatest.DispatchReporter$$anonfun$1.apply(DispatchReporter.scala:101) at org.scalatest.DispatchReporter$$anonfun$1.apply(DispatchReporter.scala:50) at scala.Function0$class.apply$mcV$sp(Function0.scala:39) at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17) at scala.actors.Actor$$anon$1.act(Actor.scala:135) at scala.actors.Reactor$$anonfun$dostart$1.apply(Reactor.scala:222) at scala.actors.Reactor$$anonfun$dostart$1.apply(Reactor.scala:222) at scala.actors.ReactorTask.run(ReactorTask.scala:36) at scala.concurrent.forkjoin.ForkJoinPool$AdaptedRunnable.exec(ForkJoinPool.java:611) at scala.concurrent.forkjoin.ForkJoinTask.quietlyExec(ForkJoinTask.java:422) at scala.concurrent.forkjoin.ForkJoinWorkerThread.mainLoop(ForkJoinWorkerThread.java:340) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:325) 11:43:11,038 ERROR ~ @68nef9k71 Cannot ouput XML unit output Template execution error (In {module:testrunner}/app/views/TestRunner/results-xunit.xml around line 23) Execution error occured in template {module:testrunner}/app/views/TestRunner/results-xunit.xml. Exception raised was NullPointerException : Cannot invoke method escapeXml() on null object. play.exceptions.TemplateExecutionException: Cannot invoke method escapeXml() on null object at play.templates.BaseTemplate.throwException(BaseTemplate.java:86) at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:257) at play.templates.Template.render(Template.java:26) at play.templates.GroovyTemplate.render(GroovyTemplate.java:187) at controllers.TestRunner.run(TestRunner.java:79) at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:548) at play.mvc.ActionInvoker.invoke(ActionInvoker.java:502) at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:478) at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:473) at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161) at Invocation.HTTP Request(Play!) Caused by: java.lang.NullPointerException: Cannot invoke method escapeXml() on null object at {module:testrunner}/app/views/TestRunner/results-xunit.xml.(line:23) at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:232) ... 9 more </code></pre> <p>Update: It happened because of the following exception that the test had triggered. Does the test framework supposed to blow up when a test throws an exception?</p> <pre><code>java.util.NoSuchElementException at scala.collection.IterableLike$class.head(IterableLike.scala:101) at scala.xml.NodeSeq.head(NodeSeq.scala:43) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload