Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7406

AntBuilder can't run a pure JUnit4 task, whereas Ant can do

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.4.3
    • None
    • Ant integration
    • None

    Description

      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

      public static Test suite() { return JUnit4TestAdapter(<testclass>)}
      

      to your test suite everything works fine even in Groovy 2.4.3.

      Attachments

        Activity

          People

            Unassigned Unassigned
            SuperNarrator Gert Großmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: