[ 
http://jira.codehaus.org/browse/SUREFIRE-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=243778#action_243778
 ] 

Gareth Clay commented on SUREFIRE-587:
--------------------------------------

Hmm... Having taken a *very* brief look at the code, it seems that surefire's 
JUnit4TestChecker.isValidJUnit4Test() method is doing the right thing. So it's 
just not getting the right list of test classes to apply that filtering to. 

Following on from that, I've successfully worked around this issue by 
explicitly adding

<includes>
  <include>**/*.class</include>
</includes>

to my POM. I think this should be the default implicit behaviour - it makes no 
sense to filter by class name when the only requirement for inclusion is an 
@Test annotation.

> Doesn't run tests if they don't end with Test
> ---------------------------------------------
>
>                 Key: SUREFIRE-587
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-587
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: JUnit 3.x support, Junit 4.x support
>    Affects Versions: 2.4.3
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Priority: Critical
>
> We have a mix of test - some purely junit4 (e.g. not extending anything and 
> annotating with @Test) - and some which extends TestCase.
> I've discovered that the ones extending TestCase won't run if the classname 
> doesn't end with Test - so that the class CommonsAttributesParserTests won't 
> get included (notice the ending "s").

-- 
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