[ https://jira.codehaus.org/browse/SUREFIRE-575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=336066#comment-336066 ]
David Forsman edited comment on SUREFIRE-575 at 11/20/13 11:32 AM: ------------------------------------------------------------------- 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 where we have both TestNG and JUnit. 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 { // Silently swallowed by surefire testng! @org.junit.BeforeClass public static void beforeClass() { throw new NullPointerException(); } // never reach here?! @org.junit.Test public void junitMe() { throw new NullPointerException("Never get here!!"); } } was (Author: achoice): 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 { // Silently swallowed by surefire testng! @org.junit.BeforeClass public static void beforeClass() { throw new NullPointerException(); } // never reach here?! @org.junit.Test public void junitMe() { 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