Description:
Ant task to verify results of a test run, can fail a build if certain conditions are not met
| Name | Type | Description |
| expectedErrors | int | Number of errors that are expected (optional) |
| expectedFiles | int | Number of files that are expected to be processed (optional) |
| mode | String | The comparison mode to use. The legal values are EQUALS, NOT_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS |
| report | String | The report file to process. Default value is: "reports/parasoft/test.xml" |
<?xml version="1.0"?>
<project name="Parasoft Build" default="parasoft-build" xmlns:parasoft="antlib:com.parasoft.antlib">
<import file="build.xml"/> <-- import the original build script -->
<target name="parasoft-init">
<parasoft:monitor id="monitor" /> <!-- install the monitor -->
</target>
<target name="parasoft-build" depends="parasoft-init, compile"> <!-- compile is from the original build script -->
<parasoft:jtest config="builtin://Static Analysis">
<projectDescription monitorref="monitor"/> <!-- the reference to the monitor for use in the jtest execution -->
</parasoft:jtest>
<parasoft:verify expectedErrors="10" mode="GREATER_THAN"/> <!-- verify that 10 is GREATER_THAN the total number of errors,
or else a build failure with be occur -->
</target>
</project>