New tutorial for test optimization

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Fixed
    • 2.4.2
    • Component/s: Documentation
    • None

      We've decided to have a separate tutorial for Clover's Test Optimization functionality.

      The build_optimized.xml file gets the following lines added at the top:

       <taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
          <taskdef resource="cloverjunitlib.xml" classpath="${clover.jar}"/>
          <clover-env/>
      
          <property name="clover.ordering" value="default"/>
          <!-- @ordering: optional; values "failfast" or "normal"; default: "failfast"; -->
          <property name="clover.optimize" value="false"/>
          <!-- Enable/Disable optimization -->
          <property name="clover.fullrunevery" value="10"/>
          <!-- Determine how many builds between full builds. -->
      

      and the test.run target changes to:

          <target name="test.run" depends="test.compile" description="Runs the tests">
              <mkdir dir="${test.result}"/>
              <junit fork="yes" printsummary="true">
                  <classpath refid="testbuild.classpath"/>
                  <formatter type="xml"/>
                  <batchtest fork="yes" todir="${test.result}">
                      <clover-optimized-testset fullrunevery="${clover.fullrunevery}" optimize="${clover.optimize}"
                                                ordering="${clover.ordering}">
                          <fileset dir="${test.src}" includes="**/*Test.java"/>
                      </clover-optimized-testset>
                  </batchtest>
              </junit>
          </target>
      

            Assignee:
            Unassigned
            Reporter:
            Nick
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: