sbt/sbt
View on GitHubJUnit XML report contains wrong stacktrace/message when running in forked mode
Open
#1469 opened on Jul 28, 2014
Bugarea/test_frameworkhelp wanted
Description
@francisdb reported this bug as https://github.com/sbt/junit-interface/issues/55
However, I think this is actually an SBT bug given that JUnitXmlReportPlugin lives here
This is what is reported in the junit xml reports
sbt.ForkMain$ForkError
at com.xxx.ServerTest.testInjectingRawData(ServerTest.java:573)
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:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
But the actual failing test stacktrace looks like this
[error] Test com.xxx.ServerTest.testInjectingRawData failed: java.lang.NullPointerException: null, took 0.118 sec
[error] at com.xxx.ServerTest.testInjectingRawData(ServerTest.java:573)
[error] ...