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

New tutorial for test optimization

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • 2.4.2
    • Documentation
    • None
    • 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.

      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>
      

            [CLOV-358] New tutorial for test optimization

            Edwin Dawson [Atlassian] added a comment - Published documentation: http://confluence.atlassian.com/display/CLOVER/Part+4+-+Test+Optimization+Tutorial

            Nick added a comment -

            This tutorial would be a lot better, if it didn;t require the user to do the normal clover tutorial first.
            This tutorial should standalone, and be able to be done in isolation to normal clover usage.

            Mention the other tutorials, but don't make them a pre-requisite.

            The Clover integration is very simple, and could be dealt with entirely in the first point. The following steps should then teach the user what test-optimization is, how it works and how to use it?

            Nick added a comment - This tutorial would be a lot better, if it didn;t require the user to do the normal clover tutorial first. This tutorial should standalone, and be able to be done in isolation to normal clover usage. Mention the other tutorials, but don't make them a pre-requisite. The Clover integration is very simple, and could be dealt with entirely in the first point. The following steps should then teach the user what test-optimization is, how it works and how to use it?

            Edwin Dawson [Atlassian] added a comment - Draft documentation is here: http://confluence.atlassian.com/display/CLOVER/%28hidden+draft%29+Part+4+-+Using+Test+Optimization

            Changed "build optimization" to "test optimisation".

            Edwin Dawson [Atlassian] added a comment - Changed "build optimization" to "test optimisation".

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

                Created:
                Updated:
                Resolved: