This task is only available when using Ant 1.6+.
説明
The clover-optimized-selector> type is an Ant 1.6+ 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.
パラメーター
属性 |
説明 |
必須 |
|---|---|---|
snapshotfile |
The location to store the snapshot file, if not not in the default location. |
No; defaults to |
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 |
fullrunevery |
Specifies how many optimized builds can run before a full run should be performed (to re-calibrate the optimization). |
No; defaults to |
例
<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>