clover-optimized-testset

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

説明

The <clover-optimized-testset> type 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 cloverlib.xml.

パラメーター

属性

説明

必須

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>
最終更新日 2017 年 1 月 16 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.