Name
junit
Synopsis
Executes unit tests using the JUnit testing framework. This task requires JUnit 3.0 or later, available at http://www.junit.org.
Attributes
-
dir
(all, File, N) The working directory for the JVM. Used only when
fork=true
.-
errorproperty
(1.4, String, N) A property to set when a test error occurs.
-
failureproperty
(1.4, String, N) A property to set when a test failure occurs.
-
fork
(all, boolean, N) If
true
, fork a new JVM for the tests. Defaults tofalse
.-
haltonerror
(all, boolean, N) If
true
, stop the build if a test error occurs. Defaults tofalse
.-
haltonfailure
(all, boolean, N) If
true
, stop the build if a test failure occurs. Defaults tofalse
.-
jvm
(all, String, N) The command used to invoke the JVM. Defaults to
java
. Used only whenfork=true
.-
maxmemory
(all, String, N) The maximum amount of memory used when
fork=true
.-
printsummary
(all, Enum, N) Configures how statistics are printed for each test case. Legal values are
on
,off
, andwithOutAndErr
.withOutAndErr
is the same ason
, except the test output is also written to both standard output and standard error. Defaults tooff
.-
timeout
(all, int, N) The maximum number of milliseconds to wait for an individual test before timing out. Used only when
fork=true
.
Content
- 0..n nested
<batchtest>
elements (all) Defines a collection of tests based on naming conventions. The following attributes are supported:
-
errorproperty
(1.4, String, N) Overrides the
errorproperty
attribute specified injunit
. Defaults tofalse
.-
failureproperty
(1.4, ...
-
Get Ant: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.