Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1152

Implement test optimization for Groovy

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Implement test optimization for Groovy code for Clover-for-Ant and Clover-for-Maven2 plugins. Currently it always runs all tests.

      Tricky part in Ant:

      1) Ant <junit><batchtest> batchtest collects the included resources from any number of nested Resource Collections. It then generates a test class name for each resource that ends in .java or .class. It means that *.groovy files will be ignored. However, we could use *.class files, for example:

      <fileset dir="${build.dir}">
          <include name="**/*Test.class"/>
      </fileset>
      

      Then we can run both groovy and java unit tests from Ant.

      2) But then if we try to use *.class inclusion pattern with <clover-optimized-testset>, for instance:

      <clover-optimized-testset>
          <fileset dir="${build.dir}">
              <include name="**/*Test.class"/>
          </fileset>
      </clover-optimized-testset>
      

      then Clover (BaseCloverOptimizedTestSelector + BaseCloverOptimizedType) will try to "guess" source file name by renaming Foo.class to Foo.java. As a consequence it is unable to find Foo.groovy file...

      Tricky part in Maven:

      t.b.d.

      Tricky part with TestSuites:

      Known problem. Clover does not optimize TestSuites. Thus user cannot use any tests suites. It means that also Groovy "AllTestSuite" runner cannot be used for test launching.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mparfianowicz Marek Parfianowicz
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: