[ 
https://jira.codehaus.org/browse/SUREFIRE-575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=336066#comment-336066
 ] 

David Forsman commented on SUREFIRE-575:
----------------------------------------

Any work planned on this one - it's been four years?
Even nastier - if @BeforeClass cats exception Surefire will silently "ignore" 
the complete test class.
We ran into this during in our project. Maven test in our CI have silently 
ignored whole classes.

I regard this as critical since it is so silent and have big impact - tests not 
run.

public class JunitTest {
        
        @org.junit.BeforeClass
        public static void beforeClass() {
                // Silently swallowed by surefire testng!
                throw new NullPointerException();
        }
        
        @org.junit.Test
        public void junitMe() {
                // never reach here?!
                throw new NullPointerException("Never get here!!");
                
        }
}
                
> Test run as JUnit3 test when extends TestCase - TestNG annotations are ignored
> ------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-575
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-575
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.4.3
>         Environment: Sun JDK 1.6.0_16, Maven 2.2.1
>            Reporter: Przemyslaw Wojnowski
>         Attachments: DaoTest.java, pom.xml
>
>
> TestNG test is run as JUnit3 test when it inherits from JUnit's TestCase 
> class.
> When inheritance is removed, then test is run as TestNG test.
> In both cases in Eclipse it is run as TestNG test (BeforeClass and AfterClass 
> are called).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to