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

Unknown macro: {spacejump}

of Clover, or visit the latest Clover documentation.

説明

The <clover-optimized-testset> type is an Ant 1.7-only feature that is designed to be used within JUnit and Ant's <batchtest/> task (which is used to feed JUnit a list of .java files that map to the test classes to be run). This type accepts other resource collection elements (e.g. <fileset/> ), filters and reorders their resources for Test Optimization. To use this type, you must first include cloverjunitlib.xml.

(warning) This feature is only available for use with Ant 1.7 onwards.

パラメーター

属性

説明

必須

snapshotfile

Snapshot file path if not in the default location.

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

enabled

Boolean value that specifies whether the selector should optimize. If set to false no optimization occurs, if true, then optimization occurs as per the other attributes.

No; defaults to "true".

minimize

Boolean value that (when true) tells Clover to restrict the set of tests, running only those that caused coverage in a changed file. When set to false, this will cause Clover to run all tests. this attribute can be used to force a full test run 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".

ordering

Specifies how tests should be ordered during an optimized build. Accepts values "failfast", "original" or "random". The "failfast" setting runs the previously failed test first then shortest to longest test. The "original" setting orders the tests as they were found by the underlying fileset. The "random" setting applies a random ordering to the tests.

No; defaults to "failfast".

Elements:
<*/> - any Ant resource collection: anything that implements org.apache.tools.ant.types.ResourceCollection.

<junit ...>
    <batchtest todir="${outdir}/${testresultsprefix}" fork="true">
        <clover-optimized-testset fullrunevery="${max.optimized.builds}">
            <fileset dir="${test.location}" includes="**/*Test.java"/>
        </clover-optimized-testset>
        <formatter type="xml"/>
        <formatter type="plain"/>
    </batchtest>
</junit>
  • ラベルなし