[ http://jira.codehaus.org/browse/SUREFIRE-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=243769#action_243769 ]
Gareth Clay commented on SUREFIRE-587: -------------------------------------- I've hit this issue with only pure JUnit4 tests too. Our build machine is currently only running 27 of our 120+ tests (those with class names that begin or end in 'Test'). As I understand it, the only requirement for a JUnit4 test to be run is the presence of the @Test annotation on the test method. The name of the class and the (non)presence of @RunWith on the class should make no difference. The JUnit4 runner in Eclipse follows this behaviour, and correctly identifies all of our tests. All this with JUnit4.4, and surefire 2.7-SNAPSHOT as at 20101119 (since I'd been hoping this had been fixed as part of SUREFIRE-482, but it doesn't seem that way). > 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