????
| Current Path : /opt/ant/manual/api/org/apache/tools/ant/taskdefs/optional/junit/ |
| Current File : //opt/ant/manual/api/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_03) on Tue May 22 06:24:54 CEST 2012 -->
<title>JUnitTask (Apache Ant API)</title>
<meta name="date" content="2012-05-22">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="JUnitTask (Apache Ant API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitResultFormatter.html" title="interface in org.apache.tools.ant.taskdefs.optional.junit"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.ForkMode.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html" target="_top">Frames</a></li>
<li><a href="JUnitTask.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.tools.ant.taskdefs.optional.junit</div>
<h2 title="Class JUnitTask" class="title">Class JUnitTask</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">org.apache.tools.ant.ProjectComponent</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">org.apache.tools.ant.Task</a></li>
<li>
<ul class="inheritance">
<li>org.apache.tools.ant.taskdefs.optional.junit.JUnitTask</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.lang.Cloneable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">JUnitTask</span>
extends <a href="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</a></pre>
<div class="block">Runs JUnit tests.
<p> JUnit is a framework to create unit tests. It has been initially
created by Erich Gamma and Kent Beck. JUnit can be found at <a
href="http://www.junit.org">http://www.junit.org</a>.
<p> <code>JUnitTask</code> can run a single specific
<code>JUnitTest</code> using the <code>test</code> element.</p>
For example, the following target <code><pre>
<target name="test-int-chars" depends="jar-test">
<echo message="testing international characters"/>
<junit printsummary="no" haltonfailure="yes" fork="false">
<classpath refid="classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.ecs.InternationalCharTest" />
</junit>
</target>
</pre></code>
<p>runs a single junit test
(<code>org.apache.ecs.InternationalCharTest</code>) in the current
VM using the path with id <code>classpath</code> as classpath and
presents the results formatted using the standard
<code>plain</code> formatter on the command line.</p>
<p> This task can also run batches of tests. The
<code>batchtest</code> element creates a <code>BatchTest</code>
based on a fileset. This allows, for example, all classes found in
directory to be run as testcases.</p>
<p>For example,</p><code><pre>
<target name="run-tests" depends="dump-info,compile-tests" if="junit.present">
<junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
<jvmarg value="-classic"/>
<classpath refid="tests-classpath"/>
<sysproperty key="build.tests" value="${build.tests}"/>
<formatter type="brief" usefile="false" />
<batchtest>
<fileset dir="${tests.dir}">
<include name="**/*Test*" />
</fileset>
</batchtest>
</junit>
</target>
</pre></code>
<p>this target finds any classes with a <code>test</code> directory
anywhere in their path (under the top <code>${tests.dir}</code>, of
course) and creates <code>JUnitTest</code>'s for each one.</p>
<p> Of course, <code><junit></code> and
<code><batch></code> elements can be combined for more
complex tests. For an example, see the ant <code>build.xml</code>
target <code>run-tests</code> (the second example is an edited
version).</p>
<p> To spawn a new Java VM to prevent interferences between
different testcases, you need to enable <code>fork</code>. A
number of attributes and elements allow you to set up how this JVM
runs.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><code>JUnitTest</code></a>,
<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/BatchTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><code>BatchTest</code></a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.ForkMode.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTask.ForkMode</a></strong></code>
<div class="block">These are the different forking options</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static class </code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.JUnitLogOutputStream.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTask.JUnitLogOutputStream</a></strong></code>
<div class="block">A stream handler for handling the junit task.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static class </code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.JUnitLogStreamHandler.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTask.JUnitLogStreamHandler</a></strong></code>
<div class="block">A log stream handler for junit.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.SummaryAttribute.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTask.SummaryAttribute</a></strong></code>
<div class="block">Print summary enumeration values.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static class </code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.TestResultHolder.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTask.TestResultHolder</a></strong></code>
<div class="block">A value class that contains the result of a test.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#ENABLE_TESTLISTENER_EVENTS">ENABLE_TESTLISTENER_EVENTS</a></strong></code>
<div class="block">Name of magic property that enables test listener events.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#TESTLISTENER_PREFIX">TESTLISTENER_PREFIX</a></strong></code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_org.apache.tools.ant.Task">
<!-- -->
</a>
<h3>Fields inherited from class org.apache.tools.ant.<a href="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</a></h3>
<code><a href="../../../../../../../org/apache/tools/ant/Task.html#target">target</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#taskName">taskName</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#taskType">taskType</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#wrapper">wrapper</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_org.apache.tools.ant.ProjectComponent">
<!-- -->
</a>
<h3>Fields inherited from class org.apache.tools.ant.<a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</a></h3>
<code><a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html#description">description</a>, <a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html#location">location</a>, <a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html#project">project</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#JUnitTask()">JUnitTask</a></strong>()</code>
<div class="block">Creates a new JUnitRunner and enables fork of a new Java VM.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#actOnTestResult(int, boolean, org.apache.tools.ant.taskdefs.optional.junit.JUnitTest, java.lang.String)">actOnTestResult</a></strong>(int exitValue,
boolean wasKilled,
<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</a> test,
java.lang.String name)</code>
<div class="block">Logs information about failed tests, potentially stops
processing (by throwing a BuildException) if a failure/error
occurred or sets a property.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#actOnTestResult(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.TestResultHolder, org.apache.tools.ant.taskdefs.optional.junit.JUnitTest, java.lang.String)">actOnTestResult</a></strong>(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.TestResultHolder.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTask.TestResultHolder</a> result,
<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</a> test,
java.lang.String name)</code>
<div class="block">Logs information about failed tests, potentially stops
processing (by throwing a BuildException) if a failure/error
occurred or sets a property.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addAssertions(org.apache.tools.ant.types.Assertions)">addAssertions</a></strong>(<a href="../../../../../../../org/apache/tools/ant/types/Assertions.html" title="class in org.apache.tools.ant.types">Assertions</a> asserts)</code>
<div class="block">Assertions to enable in this program (if fork=true)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addClasspathEntry(java.lang.String)">addClasspathEntry</a></strong>(java.lang.String resource)</code>
<div class="block">Search for the given resource and add the directory or archive
that contains it to the classpath.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addConfiguredSysproperty(org.apache.tools.ant.types.Environment.Variable)">addConfiguredSysproperty</a></strong>(<a href="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</a> sysp)</code>
<div class="block">Adds a system property that tests can access.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addEnv(org.apache.tools.ant.types.Environment.Variable)">addEnv</a></strong>(<a href="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</a> var)</code>
<div class="block">Adds an environment variable; used when forking.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addFormatter(org.apache.tools.ant.taskdefs.optional.junit.FormatterElement)">addFormatter</a></strong>(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">FormatterElement</a> fe)</code>
<div class="block">Add a new formatter to all tests of this task.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addSysproperty(org.apache.tools.ant.types.Environment.Variable)">addSysproperty</a></strong>(<a href="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</a> sysp)</code>
<div class="block"><strong>Deprecated.</strong>
<div class="block"><i>since ant 1.6</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addSyspropertyset(org.apache.tools.ant.types.PropertySet)">addSyspropertyset</a></strong>(<a href="../../../../../../../org/apache/tools/ant/types/PropertySet.html" title="class in org.apache.tools.ant.types">PropertySet</a> sysp)</code>
<div class="block">Adds a set of properties that will be used as system properties
that tests can access.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addTest(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)">addTest</a></strong>(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</a> test)</code>
<div class="block">Add a new single testcase.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected java.util.Enumeration</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#allTests()">allTests</a></strong>()</code>
<div class="block">return an enumeration listing each test, then each batchtest</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#cleanup()">cleanup</a></strong>()</code>
<div class="block">Removes resources.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/BatchTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">BatchTest</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createBatchTest()">createBatchTest</a></strong>()</code>
<div class="block">Adds a set of tests based on pattern matching.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createBootclasspath()">createBootclasspath</a></strong>()</code>
<div class="block">Adds a path to the bootclasspath.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createClasspath()">createClasspath</a></strong>()</code>
<div class="block">Adds path to classpath used for tests.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/tools/ant/types/Commandline.Argument.html" title="class in org.apache.tools.ant.types">Commandline.Argument</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createJvmarg()">createJvmarg</a></strong>()</code>
<div class="block">Adds a JVM argument; ignored if not forking.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/tools/ant/types/Permissions.html" title="class in org.apache.tools.ant.types">Permissions</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createPermissions()">createPermissions</a></strong>()</code>
<div class="block">Sets the permissions for the application run inside the same JVM.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../../../org/apache/tools/ant/taskdefs/ExecuteWatchdog.html" title="class in org.apache.tools.ant.taskdefs">ExecuteWatchdog</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createWatchdog()">createWatchdog</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#execute()">execute</a></strong>()</code>
<div class="block">Runs the testcase.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#execute(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)">execute</a></strong>(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</a> arg)</code>
<div class="block">Run the tests.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#execute(java.util.List)">execute</a></strong>(java.util.List testList)</code>
<div class="block">Execute a list of tests in a single forked Java VM.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected java.util.Collection</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#executeOrQueue(java.util.Enumeration, boolean)">executeOrQueue</a></strong>(java.util.Enumeration testList,
boolean runIndividual)</code>
<div class="block">Executes all tests that don't need to be forked (or all tests
if the runIndividual argument is true.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../../../org/apache/tools/ant/types/CommandlineJava.html" title="class in org.apache.tools.ant.types">CommandlineJava</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#getCommandline()">getCommandline</a></strong>()</code>
<div class="block">Get the command line used to run the tests.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected java.io.OutputStream</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#getDefaultOutput()">getDefaultOutput</a></strong>()</code>
<div class="block">Get the default output for a formatter.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#getEnableTestListenerEvents()">getEnableTestListenerEvents</a></strong>()</code>
<div class="block">Whether test listener events shall be generated.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected java.util.Enumeration</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#getIndividualTests()">getIndividualTests</a></strong>()</code>
<div class="block">Merge all individual tests from the batchtest with all individual tests
and return an enumeration over all <tt>JUnitTest</tt>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected java.io.File</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#getOutput(org.apache.tools.ant.taskdefs.optional.junit.FormatterElement, org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)">getOutput</a></strong>(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">FormatterElement</a> fe,
<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</a> test)</code>
<div class="block">If the formatter sends output to a file, return that file.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#handleErrorFlush(java.lang.String)">handleErrorFlush</a></strong>(java.lang.String output)</code>
<div class="block">Pass output sent to System.err to the TestRunner so it can
collect it for the formatters.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#handleErrorOutput(java.lang.String)">handleErrorOutput</a></strong>(java.lang.String output)</code>
<div class="block">Pass output sent to System.err to the TestRunner so it can
collect it for the formatters.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#handleFlush(java.lang.String)">handleFlush</a></strong>(java.lang.String output)</code>
<div class="block">Pass output sent to System.out to the TestRunner so it can
collect ot for the formatters.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#handleInput(byte[], int, int)">handleInput</a></strong>(byte[] buffer,
int offset,
int length)</code>
<div class="block">Handle an input request by this task.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#handleOutput(java.lang.String)">handleOutput</a></strong>(java.lang.String output)</code>
<div class="block">Pass output sent to System.out to the TestRunner so it can
collect it for the formatters.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#init()">init</a></strong>()</code>
<div class="block">Adds the jars or directories containing Ant, this task and
JUnit to the classpath - this should make the forked JVM work
without having to specify them directly.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setCloneVm(boolean)">setCloneVm</a></strong>(boolean cloneVm)</code>
<div class="block">If set, system properties will be copied to the cloned VM - as
well as the bootclasspath unless you have explicitly specified
a bootclaspath.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setDir(java.io.File)">setDir</a></strong>(java.io.File dir)</code>
<div class="block">The directory to invoke the VM in.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setEnableTestListenerEvents(boolean)">setEnableTestListenerEvents</a></strong>(boolean b)</code>
<div class="block">Whether test listener events shall be generated.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setErrorProperty(java.lang.String)">setErrorProperty</a></strong>(java.lang.String propertyName)</code>
<div class="block">Property to set to "true" if there is a error in a test.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFailureProperty(java.lang.String)">setFailureProperty</a></strong>(java.lang.String propertyName)</code>
<div class="block">Property to set to "true" if there is a failure in a test.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFiltertrace(boolean)">setFiltertrace</a></strong>(boolean value)</code>
<div class="block">If true, smartly filter the stack frames of
JUnit errors and failures before reporting them.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)">setFork</a></strong>(boolean value)</code>
<div class="block">If true, JVM should be forked for each test.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setForkMode(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.ForkMode)">setForkMode</a></strong>(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.ForkMode.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTask.ForkMode</a> mode)</code>
<div class="block">Set the behavior when <a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)"><code>fork</code></a> fork has been enabled.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setHaltonerror(boolean)">setHaltonerror</a></strong>(boolean value)</code>
<div class="block">If true, stop the build process when there is an error in a test.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setHaltonfailure(boolean)">setHaltonfailure</a></strong>(boolean value)</code>
<div class="block">If true, stop the build process if a test fails
(errors are considered failures as well).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setIncludeantruntime(boolean)">setIncludeantruntime</a></strong>(boolean b)</code>
<div class="block">If true, include ant.jar, optional.jar and junit.jar in the forked VM.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setJvm(java.lang.String)">setJvm</a></strong>(java.lang.String value)</code>
<div class="block">The command used to invoke the Java Virtual Machine,
default is 'java'.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setLogFailedTests(boolean)">setLogFailedTests</a></strong>(boolean logFailedTests)</code>
<div class="block">If true, write a single "FAILED" line for failed tests to Ant's
log system.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setMaxmemory(java.lang.String)">setMaxmemory</a></strong>(java.lang.String max)</code>
<div class="block">Set the maximum memory to be used by all forked JVMs.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setNewenvironment(boolean)">setNewenvironment</a></strong>(boolean newenv)</code>
<div class="block">If true, use a new environment when forked.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setOutputToFormatters(boolean)">setOutputToFormatters</a></strong>(boolean outputToFormatters)</code>
<div class="block">If true, send any output generated by tests to the formatters.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setPrintsummary(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.SummaryAttribute)">setPrintsummary</a></strong>(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.SummaryAttribute.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTask.SummaryAttribute</a> value)</code>
<div class="block">If true, print one-line statistics for each test, or "withOutAndErr"
to also show standard output and error.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setReloading(boolean)">setReloading</a></strong>(boolean value)</code>
<div class="block">If true, force ant to re-classload all classes for each JUnit TestCase</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setShowOutput(boolean)">setShowOutput</a></strong>(boolean showOutput)</code>
<div class="block">If true, send any output generated by tests to Ant's logging system
as well as to the formatters.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setTempdir(java.io.File)">setTempdir</a></strong>(java.io.File tmpDir)</code>
<div class="block">Where Ant should place temporary files.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setTimeout(java.lang.Integer)">setTimeout</a></strong>(java.lang.Integer value)</code>
<div class="block">Set the timeout value (in milliseconds).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setupJUnitDelegate()">setupJUnitDelegate</a></strong>()</code>
<div class="block">Sets up the delegate that will actually run the tests.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.tools.ant.Task">
<!-- -->
</a>
<h3>Methods inherited from class org.apache.tools.ant.<a href="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</a></h3>
<code><a href="../../../../../../../org/apache/tools/ant/Task.html#bindToOwner(org.apache.tools.ant.Task)">bindToOwner</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#getOwningTarget()">getOwningTarget</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#getRuntimeConfigurableWrapper()">getRuntimeConfigurableWrapper</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#getTaskName()">getTaskName</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#getTaskType()">getTaskType</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#getWrapper()">getWrapper</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#isInvalid()">isInvalid</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#log(java.lang.String)">log</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#log(java.lang.String, int)">log</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#log(java.lang.String, java.lang.Throwable, int)">log</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#log(java.lang.Throwable, int)">log</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#maybeConfigure()">maybeConfigure</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#perform()">perform</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#reconfigure()">reconfigure</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#setOwningTarget(org.apache.tools.ant.Target)">setOwningTarget</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#setRuntimeConfigurableWrapper(org.apache.tools.ant.RuntimeConfigurable)">setRuntimeConfigurableWrapper</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#setTaskName(java.lang.String)">setTaskName</a>, <a href="../../../../../../../org/apache/tools/ant/Task.html#setTaskType(java.lang.String)">setTaskType</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.tools.ant.ProjectComponent">
<!-- -->
</a>
<h3>Methods inherited from class org.apache.tools.ant.<a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</a></h3>
<code><a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html#clone()">clone</a>, <a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html#getDescription()">getDescription</a>, <a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html#getLocation()">getLocation</a>, <a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html#getProject()">getProject</a>, <a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html#setDescription(java.lang.String)">setDescription</a>, <a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html#setLocation(org.apache.tools.ant.Location)">setLocation</a>, <a href="../../../../../../../org/apache/tools/ant/ProjectComponent.html#setProject(org.apache.tools.ant.Project)">setProject</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="TESTLISTENER_PREFIX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TESTLISTENER_PREFIX</h4>
<pre>public static final java.lang.String TESTLISTENER_PREFIX</pre>
<dl><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.7</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../constant-values.html#org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.TESTLISTENER_PREFIX">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ENABLE_TESTLISTENER_EVENTS">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ENABLE_TESTLISTENER_EVENTS</h4>
<pre>public static final java.lang.String ENABLE_TESTLISTENER_EVENTS</pre>
<div class="block">Name of magic property that enables test listener events.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../constant-values.html#org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.ENABLE_TESTLISTENER_EVENTS">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="JUnitTask()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>JUnitTask</h4>
<pre>public JUnitTask()
throws java.lang.Exception</pre>
<div class="block">Creates a new JUnitRunner and enables fork of a new Java VM.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - under ??? circumstances</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setReloading(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReloading</h4>
<pre>public void setReloading(boolean value)</pre>
<div class="block">If true, force ant to re-classload all classes for each JUnit TestCase</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - force class reloading for each test case</dd></dl>
</li>
</ul>
<a name="setFiltertrace(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFiltertrace</h4>
<pre>public void setFiltertrace(boolean value)</pre>
<div class="block">If true, smartly filter the stack frames of
JUnit errors and failures before reporting them.
<p>This property is applied on all BatchTest (batchtest) and
JUnitTest (test) however it can possibly be overridden by their
own properties.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - <tt>false</tt> if it should not filter, otherwise
<tt>true<tt></dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.5</dd></dl>
</li>
</ul>
<a name="setHaltonerror(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setHaltonerror</h4>
<pre>public void setHaltonerror(boolean value)</pre>
<div class="block">If true, stop the build process when there is an error in a test.
This property is applied on all BatchTest (batchtest) and JUnitTest
(test) however it can possibly be overridden by their own
properties.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - <tt>true</tt> if it should halt, otherwise
<tt>false</tt></dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd></dl>
</li>
</ul>
<a name="setErrorProperty(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setErrorProperty</h4>
<pre>public void setErrorProperty(java.lang.String propertyName)</pre>
<div class="block">Property to set to "true" if there is a error in a test.
<p>This property is applied on all BatchTest (batchtest) and
JUnitTest (test), however, it can possibly be overriden by
their own properties.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>propertyName</code> - the name of the property to set in the
event of an error.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.4</dd></dl>
</li>
</ul>
<a name="setHaltonfailure(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setHaltonfailure</h4>
<pre>public void setHaltonfailure(boolean value)</pre>
<div class="block">If true, stop the build process if a test fails
(errors are considered failures as well).
This property is applied on all BatchTest (batchtest) and
JUnitTest (test) however it can possibly be overridden by their
own properties.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - <tt>true</tt> if it should halt, otherwise
<tt>false</tt></dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd></dl>
</li>
</ul>
<a name="setFailureProperty(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFailureProperty</h4>
<pre>public void setFailureProperty(java.lang.String propertyName)</pre>
<div class="block">Property to set to "true" if there is a failure in a test.
<p>This property is applied on all BatchTest (batchtest) and
JUnitTest (test), however, it can possibly be overriden by
their own properties.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>propertyName</code> - the name of the property to set in the
event of an failure.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.4</dd></dl>
</li>
</ul>
<a name="setFork(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFork</h4>
<pre>public void setFork(boolean value)</pre>
<div class="block">If true, JVM should be forked for each test.
<p>It avoids interference between testcases and possibly avoids
hanging the build. this property is applied on all BatchTest
(batchtest) and JUnitTest (test) however it can possibly be
overridden by their own properties.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - <tt>true</tt> if a JVM should be forked, otherwise
<tt>false</tt></dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setTimeout(java.lang.Integer)"><code>setTimeout(java.lang.Integer)</code></a></dd></dl>
</li>
</ul>
<a name="setForkMode(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.ForkMode)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setForkMode</h4>
<pre>public void setForkMode(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.ForkMode.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTask.ForkMode</a> mode)</pre>
<div class="block">Set the behavior when <a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)"><code>fork</code></a> fork has been enabled.
<p>Possible values are "once", "perTest" and "perBatch". If
set to "once", only a single Java VM will be forked for all
tests, with "perTest" (the default) each test will run in a
fresh Java VM and "perBatch" will run all tests from the same
<batchtest> in the same Java VM.</p>
<p>This attribute will be ignored if tests run in the same VM
as Ant.</p>
<p>Only tests with the same configuration of haltonerror,
haltonfailure, errorproperty, failureproperty and filtertrace
can share a forked Java VM, so even if you set the value to
"once", Ant may need to fork mutliple VMs.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>mode</code> - the mode to use.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6.2</dd></dl>
</li>
</ul>
<a name="setPrintsummary(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.SummaryAttribute)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPrintsummary</h4>
<pre>public void setPrintsummary(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.SummaryAttribute.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTask.SummaryAttribute</a> value)</pre>
<div class="block">If true, print one-line statistics for each test, or "withOutAndErr"
to also show standard output and error.
Can take the values on, off, and withOutAndErr.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - <tt>true</tt> to print a summary,
<tt>withOutAndErr</tt> to include the test's output as
well, <tt>false</tt> otherwise.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><code>SummaryJUnitResultFormatter</code></a></dd></dl>
</li>
</ul>
<a name="setTimeout(java.lang.Integer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTimeout</h4>
<pre>public void setTimeout(java.lang.Integer value)</pre>
<div class="block">Set the timeout value (in milliseconds).
<p>If the test is running for more than this value, the test
will be canceled. (works only when in 'fork' mode).</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - the maximum time (in milliseconds) allowed before
declaring the test as 'timed-out'</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)"><code>setFork(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="setMaxmemory(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxmemory</h4>
<pre>public void setMaxmemory(java.lang.String max)</pre>
<div class="block">Set the maximum memory to be used by all forked JVMs.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>max</code> - the value as defined by <tt>-mx</tt> or <tt>-Xmx</tt>
in the java command line options.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd></dl>
</li>
</ul>
<a name="setJvm(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJvm</h4>
<pre>public void setJvm(java.lang.String value)</pre>
<div class="block">The command used to invoke the Java Virtual Machine,
default is 'java'. The command is resolved by
java.lang.Runtime.exec(). Ignored if fork is disabled.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - the new VM to use instead of <tt>java</tt></dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)"><code>setFork(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="createJvmarg()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createJvmarg</h4>
<pre>public <a href="../../../../../../../org/apache/tools/ant/types/Commandline.Argument.html" title="class in org.apache.tools.ant.types">Commandline.Argument</a> createJvmarg()</pre>
<div class="block">Adds a JVM argument; ignored if not forking.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>create a new JVM argument so that any argument can be
passed to the JVM.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)"><code>setFork(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="setDir(java.io.File)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDir</h4>
<pre>public void setDir(java.io.File dir)</pre>
<div class="block">The directory to invoke the VM in. Ignored if no JVM is forked.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dir</code> - the directory to invoke the JVM from.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)"><code>setFork(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="addSysproperty(org.apache.tools.ant.types.Environment.Variable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addSysproperty</h4>
<pre>public void addSysproperty(<a href="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</a> sysp)</pre>
<div class="block"><span class="strong">Deprecated.</span> <i>since ant 1.6</i></div>
<div class="block">Adds a system property that tests can access.
This might be useful to tranfer Ant properties to the
testcases when JVM forking is not enabled.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sysp</code> - environment variable to add</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.3</dd></dl>
</li>
</ul>
<a name="addConfiguredSysproperty(org.apache.tools.ant.types.Environment.Variable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addConfiguredSysproperty</h4>
<pre>public void addConfiguredSysproperty(<a href="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</a> sysp)</pre>
<div class="block">Adds a system property that tests can access.
This might be useful to tranfer Ant properties to the
testcases when JVM forking is not enabled.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sysp</code> - new environment variable to add</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6</dd></dl>
</li>
</ul>
<a name="addSyspropertyset(org.apache.tools.ant.types.PropertySet)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addSyspropertyset</h4>
<pre>public void addSyspropertyset(<a href="../../../../../../../org/apache/tools/ant/types/PropertySet.html" title="class in org.apache.tools.ant.types">PropertySet</a> sysp)</pre>
<div class="block">Adds a set of properties that will be used as system properties
that tests can access.
This might be useful to tranfer Ant properties to the
testcases when JVM forking is not enabled.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sysp</code> - set of properties to be added</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6</dd></dl>
</li>
</ul>
<a name="createClasspath()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createClasspath</h4>
<pre>public <a href="../../../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a> createClasspath()</pre>
<div class="block">Adds path to classpath used for tests.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>reference to the classpath in the embedded java command line</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd></dl>
</li>
</ul>
<a name="createBootclasspath()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createBootclasspath</h4>
<pre>public <a href="../../../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</a> createBootclasspath()</pre>
<div class="block">Adds a path to the bootclasspath.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>reference to the bootclasspath in the embedded java command line</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6</dd></dl>
</li>
</ul>
<a name="addEnv(org.apache.tools.ant.types.Environment.Variable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addEnv</h4>
<pre>public void addEnv(<a href="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</a> var)</pre>
<div class="block">Adds an environment variable; used when forking.
<p>Will be ignored if we are not forking a new VM.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>var</code> - environment variable to be added</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.5</dd></dl>
</li>
</ul>
<a name="setNewenvironment(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNewenvironment</h4>
<pre>public void setNewenvironment(boolean newenv)</pre>
<div class="block">If true, use a new environment when forked.
<p>Will be ignored if we are not forking a new VM.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newenv</code> - boolean indicating if setting a new environment is wished</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.5</dd></dl>
</li>
</ul>
<a name="addTest(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addTest</h4>
<pre>public void addTest(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</a> test)</pre>
<div class="block">Add a new single testcase.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>test</code> - a new single testcase</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><code>JUnitTest</code></a></dd></dl>
</li>
</ul>
<a name="createBatchTest()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createBatchTest</h4>
<pre>public <a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/BatchTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">BatchTest</a> createBatchTest()</pre>
<div class="block">Adds a set of tests based on pattern matching.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>a new instance of a batch test.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/BatchTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><code>BatchTest</code></a></dd></dl>
</li>
</ul>
<a name="addFormatter(org.apache.tools.ant.taskdefs.optional.junit.FormatterElement)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addFormatter</h4>
<pre>public void addFormatter(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">FormatterElement</a> fe)</pre>
<div class="block">Add a new formatter to all tests of this task.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fe</code> - formatter element</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd></dl>
</li>
</ul>
<a name="setIncludeantruntime(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIncludeantruntime</h4>
<pre>public void setIncludeantruntime(boolean b)</pre>
<div class="block">If true, include ant.jar, optional.jar and junit.jar in the forked VM.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - include ant run time yes or no</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.5</dd></dl>
</li>
</ul>
<a name="setShowOutput(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setShowOutput</h4>
<pre>public void setShowOutput(boolean showOutput)</pre>
<div class="block">If true, send any output generated by tests to Ant's logging system
as well as to the formatters.
By default only the formatters receive the output.
<p>Output will always be passed to the formatters and not by
shown by default. This option should for example be set for
tests that are interactive and prompt the user to do
something.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>showOutput</code> - if true, send output to Ant's logging system too</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.5</dd></dl>
</li>
</ul>
<a name="setOutputToFormatters(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOutputToFormatters</h4>
<pre>public void setOutputToFormatters(boolean outputToFormatters)</pre>
<div class="block">If true, send any output generated by tests to the formatters.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>outputToFormatters</code> - if true, send output to formatters (Default
is true).</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.7.0</dd></dl>
</li>
</ul>
<a name="setLogFailedTests(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLogFailedTests</h4>
<pre>public void setLogFailedTests(boolean logFailedTests)</pre>
<div class="block">If true, write a single "FAILED" line for failed tests to Ant's
log system.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.8.0</dd></dl>
</li>
</ul>
<a name="addAssertions(org.apache.tools.ant.types.Assertions)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addAssertions</h4>
<pre>public void addAssertions(<a href="../../../../../../../org/apache/tools/ant/types/Assertions.html" title="class in org.apache.tools.ant.types">Assertions</a> asserts)</pre>
<div class="block">Assertions to enable in this program (if fork=true)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>asserts</code> - assertion set</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6</dd></dl>
</li>
</ul>
<a name="createPermissions()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createPermissions</h4>
<pre>public <a href="../../../../../../../org/apache/tools/ant/types/Permissions.html" title="class in org.apache.tools.ant.types">Permissions</a> createPermissions()</pre>
<div class="block">Sets the permissions for the application run inside the same JVM.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6</dd></dl>
</li>
</ul>
<a name="setCloneVm(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCloneVm</h4>
<pre>public void setCloneVm(boolean cloneVm)</pre>
<div class="block">If set, system properties will be copied to the cloned VM - as
well as the bootclasspath unless you have explicitly specified
a bootclaspath.
<p>Doesn't have any effect unless fork is true.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cloneVm</code> - a <code>boolean</code> value.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.7</dd></dl>
</li>
</ul>
<a name="setTempdir(java.io.File)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTempdir</h4>
<pre>public void setTempdir(java.io.File tmpDir)</pre>
<div class="block">Where Ant should place temporary files.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>tmpDir</code> - location where temporary files should go to</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6</dd></dl>
</li>
</ul>
<a name="setEnableTestListenerEvents(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEnableTestListenerEvents</h4>
<pre>public void setEnableTestListenerEvents(boolean b)</pre>
<div class="block">Whether test listener events shall be generated.
<p>Defaults to false.</p>
<p>This value will be overridden by the magic property
ant.junit.enabletestlistenerevents if it has been set.</p></div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.8.2</dd></dl>
</li>
</ul>
<a name="getEnableTestListenerEvents()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEnableTestListenerEvents</h4>
<pre>public boolean getEnableTestListenerEvents()</pre>
<div class="block">Whether test listener events shall be generated.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.8.2</dd></dl>
</li>
</ul>
<a name="init()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>init</h4>
<pre>public void init()</pre>
<div class="block">Adds the jars or directories containing Ant, this task and
JUnit to the classpath - this should make the forked JVM work
without having to specify them directly.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/tools/ant/Task.html#init()">init</a></code> in class <code><a href="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</a></code></dd>
<dt><span class="strong">Since:</span></dt>
<dd>Ant 1.4</dd></dl>
</li>
</ul>
<a name="setupJUnitDelegate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setupJUnitDelegate</h4>
<pre>protected void setupJUnitDelegate()</pre>
<div class="block">Sets up the delegate that will actually run the tests.
<p>Will be invoked implicitly once the delegate is needed.</p></div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.7.1</dd></dl>
</li>
</ul>
<a name="execute()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>execute</h4>
<pre>public void execute()
throws <a href="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></pre>
<div class="block">Runs the testcase.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/tools/ant/Task.html#execute()">execute</a></code> in class <code><a href="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></code> - in case of test failures or errors</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd></dl>
</li>
</ul>
<a name="execute(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>execute</h4>
<pre>protected void execute(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</a> arg)
throws <a href="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></pre>
<div class="block">Run the tests.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>arg</code> - one JunitTest</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></code> - in case of test failures or errors</dd></dl>
</li>
</ul>
<a name="execute(java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>execute</h4>
<pre>protected void execute(java.util.List testList)
throws <a href="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></pre>
<div class="block">Execute a list of tests in a single forked Java VM.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>testList</code> - the list of tests to execute.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></code> - on error.</dd></dl>
</li>
</ul>
<a name="handleOutput(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleOutput</h4>
<pre>protected void handleOutput(java.lang.String output)</pre>
<div class="block">Pass output sent to System.out to the TestRunner so it can
collect it for the formatters.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/tools/ant/Task.html#handleOutput(java.lang.String)">handleOutput</a></code> in class <code><a href="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>output</code> - output coming from System.out</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.5</dd></dl>
</li>
</ul>
<a name="handleInput(byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleInput</h4>
<pre>protected int handleInput(byte[] buffer,
int offset,
int length)
throws java.io.IOException</pre>
<div class="block">Handle an input request by this task.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/tools/ant/Task.html#handleInput(byte[], int, int)">handleInput</a></code> in class <code><a href="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - the buffer into which data is to be read.</dd><dd><code>offset</code> - the offset into the buffer at which data is stored.</dd><dd><code>length</code> - the amount of data to read.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of bytes read.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if the data cannot be read.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/tools/ant/Task.html#handleInput(byte[], int, int)"><code>This implementation delegates to a runner if it
present.</code></a></dd></dl>
</li>
</ul>
<a name="handleFlush(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleFlush</h4>
<pre>protected void handleFlush(java.lang.String output)</pre>
<div class="block">Pass output sent to System.out to the TestRunner so it can
collect ot for the formatters.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/tools/ant/Task.html#handleFlush(java.lang.String)">handleFlush</a></code> in class <code><a href="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>output</code> - output coming from System.out</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.5.2</dd></dl>
</li>
</ul>
<a name="handleErrorOutput(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleErrorOutput</h4>
<pre>public void handleErrorOutput(java.lang.String output)</pre>
<div class="block">Pass output sent to System.err to the TestRunner so it can
collect it for the formatters.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/tools/ant/Task.html#handleErrorOutput(java.lang.String)">handleErrorOutput</a></code> in class <code><a href="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>output</code> - output coming from System.err</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.5</dd></dl>
</li>
</ul>
<a name="handleErrorFlush(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleErrorFlush</h4>
<pre>public void handleErrorFlush(java.lang.String output)</pre>
<div class="block">Pass output sent to System.err to the TestRunner so it can
collect it for the formatters.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/tools/ant/Task.html#handleErrorFlush(java.lang.String)">handleErrorFlush</a></code> in class <code><a href="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>output</code> - coming from System.err</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.5.2</dd></dl>
</li>
</ul>
<a name="createWatchdog()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createWatchdog</h4>
<pre>protected <a href="../../../../../../../org/apache/tools/ant/taskdefs/ExecuteWatchdog.html" title="class in org.apache.tools.ant.taskdefs">ExecuteWatchdog</a> createWatchdog()
throws <a href="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></pre>
<dl><dt><span class="strong">Returns:</span></dt><dd><tt>null</tt> if there is a timeout value, otherwise the
watchdog instance.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></code> - under unspecified circumstances</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.2</dd></dl>
</li>
</ul>
<a name="getDefaultOutput()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultOutput</h4>
<pre>protected java.io.OutputStream getDefaultOutput()</pre>
<div class="block">Get the default output for a formatter.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>default output stream for a formatter</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.3</dd></dl>
</li>
</ul>
<a name="getIndividualTests()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIndividualTests</h4>
<pre>protected java.util.Enumeration getIndividualTests()</pre>
<div class="block">Merge all individual tests from the batchtest with all individual tests
and return an enumeration over all <tt>JUnitTest</tt>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>enumeration over individual tests</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.3</dd></dl>
</li>
</ul>
<a name="allTests()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allTests</h4>
<pre>protected java.util.Enumeration allTests()</pre>
<div class="block">return an enumeration listing each test, then each batchtest</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>enumeration</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.3</dd></dl>
</li>
</ul>
<a name="getOutput(org.apache.tools.ant.taskdefs.optional.junit.FormatterElement, org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOutput</h4>
<pre>protected java.io.File getOutput(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">FormatterElement</a> fe,
<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</a> test)</pre>
<div class="block">If the formatter sends output to a file, return that file.
null otherwise.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fe</code> - formatter element</dd><dd><code>test</code> - one JUnit test</dd>
<dt><span class="strong">Returns:</span></dt><dd>file reference</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.3</dd></dl>
</li>
</ul>
<a name="addClasspathEntry(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addClasspathEntry</h4>
<pre>protected void addClasspathEntry(java.lang.String resource)</pre>
<div class="block">Search for the given resource and add the directory or archive
that contains it to the classpath.
<p>Doesn't work for archives in JDK 1.1 as the URL returned by
getResource doesn't contain the name of the archive.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>resource</code> - resource that one wants to lookup</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.4</dd></dl>
</li>
</ul>
<a name="cleanup()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cleanup</h4>
<pre>protected void cleanup()</pre>
<div class="block">Removes resources.
<p>Is invoked in <a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#execute()"><code>execute</code></a>. Subclasses that
don't invoke execute should invoke this method in a finally
block.</p></div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.7.1</dd></dl>
</li>
</ul>
<a name="getCommandline()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCommandline</h4>
<pre>protected <a href="../../../../../../../org/apache/tools/ant/types/CommandlineJava.html" title="class in org.apache.tools.ant.types">CommandlineJava</a> getCommandline()</pre>
<div class="block">Get the command line used to run the tests.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the command line.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6.2</dd></dl>
</li>
</ul>
<a name="executeOrQueue(java.util.Enumeration, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>executeOrQueue</h4>
<pre>protected java.util.Collection executeOrQueue(java.util.Enumeration testList,
boolean runIndividual)</pre>
<div class="block">Executes all tests that don't need to be forked (or all tests
if the runIndividual argument is true. Returns a collection of
lists of tests that share the same VM configuration and haven't
been executed yet.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>testList</code> - the list of tests to be executed or queued.</dd><dd><code>runIndividual</code> - if true execute each test individually.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a list of tasks to be executed.</dd><dt><span class="strong">Since:</span></dt>
<dd>1.6.2</dd></dl>
</li>
</ul>
<a name="actOnTestResult(int, boolean, org.apache.tools.ant.taskdefs.optional.junit.JUnitTest, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>actOnTestResult</h4>
<pre>protected void actOnTestResult(int exitValue,
boolean wasKilled,
<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</a> test,
java.lang.String name)</pre>
<div class="block">Logs information about failed tests, potentially stops
processing (by throwing a BuildException) if a failure/error
occurred or sets a property.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>exitValue</code> - the exitValue of the test.</dd><dd><code>wasKilled</code> - if true, the test had been killed.</dd><dd><code>test</code> - the test in question.</dd><dd><code>name</code> - the name of the test.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.6.2</dd></dl>
</li>
</ul>
<a name="actOnTestResult(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.TestResultHolder, org.apache.tools.ant.taskdefs.optional.junit.JUnitTest, java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>actOnTestResult</h4>
<pre>protected void actOnTestResult(<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.TestResultHolder.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTask.TestResultHolder</a> result,
<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</a> test,
java.lang.String name)</pre>
<div class="block">Logs information about failed tests, potentially stops
processing (by throwing a BuildException) if a failure/error
occurred or sets a property.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>result</code> - the result of the test.</dd><dd><code>test</code> - the test in question.</dd><dd><code>name</code> - the name of the test.</dd><dt><span class="strong">Since:</span></dt>
<dd>Ant 1.7</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitResultFormatter.html" title="interface in org.apache.tools.ant.taskdefs.optional.junit"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.ForkMode.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html" target="_top">Frames</a></li>
<li><a href="JUnitTask.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>