[ https://issues.apache.org/jira/browse/SUREFIRE-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15963357#comment-15963357 ]
Tibor Digana commented on SUREFIRE-1314: ---------------------------------------- [~mishail] If it is so then it would be JUnit bug. What version of junit you use? Can you please try to make a research of JUnit, add listener, and evaluate this? {{List<Failure> = new JUnitCore().run(YourTest.class).getFailures();}} It is very hard for me to help you if I do not see your project, but I think I would do the same evaluation as you should do. All we do is very similar to the above statement in Surefire, additionally we add a listener to JUnitCore instance. We use standard JUnit facilities and therefore talking about JUnit internals signals to me JUnit issue. Pls investigate the code and let me know your findings. Through RunListener of junit you will have an access to {{Description}} and you can check what the method {{isTest()}} returns. > rerunFailingTestsCount doesn't work for errors in BeforeClass methods > --------------------------------------------------------------------- > > Key: SUREFIRE-1314 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1314 > Project: Maven Surefire > Issue Type: Bug > Components: Junit 4.x support > Affects Versions: 2.19.1 > Reporter: Mikhail Stepura > > We're using {{surefire.rerunFailingTestsCoun}} property for our integration > tests, and everything working fine when an error/failure happens in a test > method (i.e. {{@Test}} ), and those test methods are re-executed later, as > expected. > But if an error happens in a {{BeforeClass}} class method, then those test > classes are not re-executed. -- This message was sent by Atlassian JIRA (v6.3.15#6346)