[
https://jira.codehaus.org/browse/SUREFIRE-768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=277987#comment-277987
]
Chris Narburgh commented on SUREFIRE-768:
-----------------------------------------
We're experiencing the same error in Surefire 2.9 for a missing spring
dependency.
Reverting back to 2.8, the test appropriately fails and produces the expected
output.
> surefire plugin is not reporting test error when a test case class fails to
> load due to ClassNotFoundException
> --------------------------------------------------------------------------------------------------------------
>
> Key: SUREFIRE-768
> URL: https://jira.codehaus.org/browse/SUREFIRE-768
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 2.4.3, 2.9
> Reporter: Peter Skopek
>
> Running tests which accidentally missing dependency failed to report test
> error.
> Following is my console output:
> ---------------------------------
> Running org.picketlink.test.trust.tests.ServletToWSTestCase
> org.apache.maven.surefire.booter.SurefireExecutionException:
> org/apache/commons/httpclient/HttpMethod; nested exception is
> java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpMethod
> java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpMethod
> at java.lang.Class.getDeclaredMethods0(Native Method)
> at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
> at java.lang.Class.getMethod0(Class.java:2670)
> at java.lang.Class.getMethod(Class.java:1603)
> at
> org.junit.internal.requests.ClassRequest.hasSuiteMethod(ClassRequest.java:61)
> at
> org.junit.internal.requests.ClassRequest.getRunnerClass(ClassRequest.java:50)
> at
> org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28)
> at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:51)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:140)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:109)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
> at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1017)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.commons.httpclient.HttpMethod
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> ... 17 more
> ---------------------------------
> And test report is missing in target/surefire-reports directory is missing
> file:
> TEST-org.picketlink.test.trust.tests.ServletToWSTestCase.xml
> That's why any reporting doesn't know that there was an attempt to run such
> test.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira