[ 
http://jira.codehaus.org/browse/SUREFIRE-480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Fabulich updated SUREFIRE-480:
----------------------------------

    Fix Version/s: Future

This may be a bug in JUnit itself rather than in Surefire.  The Java stacktrace 
in this case says something like:

{code}
junit.framework.AssertionFailedError: Class 
defaultConfiguration.TestBasicTest$1 has no public constructor TestCase(String 
name) or TestCase()
        at junit.framework.Assert.fail(Assert.java:47)
        at junit.framework.TestSuite$1.runTest(TestSuite.java:263)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        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.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
        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:345)
        at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:995)
{code}

> Improper TestCase classes incorrectly reported as a failure of the TestSuite 
> class
> ----------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-480
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-480
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: JUnit 3.x support
>    Affects Versions: 2.4.2
>         Environment: OS X 10.5, JDK 1.5.0_13, Maven 2.0.8
>            Reporter: Chad La Joie
>             Fix For: Future
>
>
> surefire creates a synthetic TestSuite from all concrete classes that match 
> its include configuration.  If one of these classes is not a proper JUnit 
> TestCase (for example if it contains no test methods) surefire reports this 
> as a test failure on the junit.framework.TestSuite$1 class, within the 
> summary and surefire report, instead of an issue with the improper test 
> class.  It does correctly flag the improper class as a failure as the plugin 
> reports the test results on console but if you have many tests its easy to 
> miss this.
> It would be nice if, in the summary and the report, the improper test class 
> can be flagged as the failing class instead of the TestSuite class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to