This is the documentation for Clover 3.3. View this page for the

Unknown macro: {spacejump}

of Clover, or visit the latest Clover documentation.

Skip to end of metadata
Go to start of metadata

This element is deprecated and will be removed in a future Clover release. Please use the clover-optimized-testset instead.

Description

The clover-optimized-selector> type is an Ant fileset selector which can be used to optimize a Junit run. Unlike <clover-optimized-testset/>, this element will not re-order tests. See the Ant Documentation for more information on selectors.

This element currently does not support Groovy class files.

Parameters

Attribute

Description

Required

snapshotfile

The location to store the snapshot file, if not not in the default location.

No; defaults to (initstring + ".snapshot").

enabled

Specifies whether the selector should optimize. If false, all files in the fileset will be selected. This attribute can be used to force an un-optimized build if, for instance, some important configuration files change and the build system decides that a full test run should be executed.

No; defaults to true.

fullrunevery

Specifies how many optimized builds can run before a full run should be performed (to re-calibrate the optimization).

No; defaults to 10.

Example

<junit ...>
    <batchtest todir="${outdir}/${testresultsprefix}" fork="true">
        <fileset dir="${test.location}" includes="**/*Test.java">
            <clover-optimized-selector fullrunevery="${max.optimized.builds}" enabled="${do.optimize.tests}"/>
        </fileset>
        <formatter type="xml"/>
        <formatter type="plain"/>
   </batchtest>
</junit>
  • No labels