[ https://issues.apache.org/jira/browse/GROOVY-7406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14520673#comment-14520673 ]
Paul King edited comment on GROOVY-7406 at 4/30/15 1:26 AM: ------------------------------------------------------------ I can see code within master, the 2_4_X and 2_1_X branches for handling JUnit 3 suites but nothing for JUnit 4 suites. I don't see the String "JUnit4TestAdapter" anywhere in the source trees for those branches. I agree it would be nice to add support for JUnit 4 suites, just a little puzzled over what might be going on in your 2.1.7 environment. was (Author: paulk): I can see code within master, the 2_4_X and 2_1_X branches for handling JUnit 3 suites but nothing for JUnit 4 suites. I don't see the String "JUnit4TestAdapter" anywhere in either source tree. I agree it would be nice to add support for JUnit 4 suites, just a little puzzled over what might be going on in your 2.1.7 environment. > AntBuilder can't run a pure JUnit4 task, whereas Ant can do > ----------------------------------------------------------- > > Key: GROOVY-7406 > URL: https://issues.apache.org/jira/browse/GROOVY-7406 > Project: Groovy > Issue Type: Bug > Components: Ant integration > Affects Versions: 2.4.3 > Reporter: Gert Großmann > > If you have a pure JUnit4 test suite with @RunWith(Suite.class) and > @Suite.SuiteClasses({ ... }) and try to execute this via AntBuilder() no > tests can be executed because it states 'No tests found in ...' > An equivalent Ant 1.9.4 <junit> task with the same compiled test suite finds > the tests. > I didn't had the issue with Groovy 2.1.7. But it seems this version added a > suite() method with a JUnit4TestAdapter. > If you add > {code} > public static Test suite() { return JUnit4TestAdapter(<testclass>)} > {code} > to your test suite everything works fine even in Groovy 2.4.3. -- This message was sent by Atlassian JIRA (v6.3.4#6332)