1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
---|
2 | <!--NewPage-->
|
---|
3 | <HTML>
|
---|
4 | <HEAD>
|
---|
5 | <!-- Generated by javadoc (build 1.4.2_13) on Mon Oct 01 14:33:28 NZST 2007 -->
|
---|
6 | <TITLE>
|
---|
7 | JUnitTask (Apache Ant API)
|
---|
8 | </TITLE>
|
---|
9 |
|
---|
10 | <META NAME="keywords" CONTENT="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask class">
|
---|
11 |
|
---|
12 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">
|
---|
13 |
|
---|
14 | <SCRIPT type="text/javascript">
|
---|
15 | function windowTitle()
|
---|
16 | {
|
---|
17 | parent.document.title="JUnitTask (Apache Ant API)";
|
---|
18 | }
|
---|
19 | </SCRIPT>
|
---|
20 |
|
---|
21 | </HEAD>
|
---|
22 |
|
---|
23 | <BODY BGCOLOR="white" onload="windowTitle();">
|
---|
24 |
|
---|
25 |
|
---|
26 | <!-- ========= START OF TOP NAVBAR ======= -->
|
---|
27 | <A NAME="navbar_top"><!-- --></A>
|
---|
28 | <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
---|
29 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
---|
30 | <TR>
|
---|
31 | <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
---|
32 | <A NAME="navbar_top_firstrow"><!-- --></A>
|
---|
33 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
---|
34 | <TR ALIGN="center" VALIGN="top">
|
---|
35 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
---|
36 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
37 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
38 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
39 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
40 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
---|
42 | </TR>
|
---|
43 | </TABLE>
|
---|
44 | </TD>
|
---|
45 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
---|
46 | </EM>
|
---|
47 | </TD>
|
---|
48 | </TR>
|
---|
49 |
|
---|
50 | <TR>
|
---|
51 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
52 | <A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.TypeAttribute.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><B>PREV CLASS</B></A>
|
---|
53 | <A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.ForkMode.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><B>NEXT CLASS</B></A></FONT></TD>
|
---|
54 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
55 | <A HREF="../../../../../../../index.html" target="_top"><B>FRAMES</B></A>
|
---|
56 | <A HREF="JUnitTask.html" target="_top"><B>NO FRAMES</B></A>
|
---|
57 | <SCRIPT type="text/javascript">
|
---|
58 | <!--
|
---|
59 | if(window==top) {
|
---|
60 | document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
---|
61 | }
|
---|
62 | //-->
|
---|
63 | </SCRIPT>
|
---|
64 | <NOSCRIPT>
|
---|
65 | <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
---|
66 | </NOSCRIPT>
|
---|
67 |
|
---|
68 | </FONT></TD>
|
---|
69 | </TR>
|
---|
70 | <TR>
|
---|
71 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
72 | SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#fields_inherited_from_class_org.apache.tools.ant.Task">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
73 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
74 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
---|
75 | </TR>
|
---|
76 | </TABLE>
|
---|
77 | <A NAME="skip-navbar_top"></A>
|
---|
78 | <!-- ========= END OF TOP NAVBAR ========= -->
|
---|
79 |
|
---|
80 | <HR>
|
---|
81 | <!-- ======== START OF CLASS DATA ======== -->
|
---|
82 | <H2>
|
---|
83 | <FONT SIZE="-1">
|
---|
84 | org.apache.tools.ant.taskdefs.optional.junit</FONT>
|
---|
85 | <BR>
|
---|
86 | Class JUnitTask</H2>
|
---|
87 | <PRE>
|
---|
88 | java.lang.Object
|
---|
89 | <IMG SRC="../../../../../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">org.apache.tools.ant.ProjectComponent</A>
|
---|
90 | <IMG SRC="../../../../../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">org.apache.tools.ant.Task</A>
|
---|
91 | <IMG SRC="../../../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.taskdefs.optional.junit.JUnitTask</B>
|
---|
92 | </PRE>
|
---|
93 | <HR>
|
---|
94 | <DL>
|
---|
95 | <DT>public class <B>JUnitTask</B><DT>extends <A HREF="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></DL>
|
---|
96 |
|
---|
97 | <P>
|
---|
98 | Runs JUnit tests.
|
---|
99 |
|
---|
100 | <p> JUnit is a framework to create unit test. It has been initially
|
---|
101 | created by Erich Gamma and Kent Beck. JUnit can be found at <a
|
---|
102 | href="http://www.junit.org">http://www.junit.org</a>.
|
---|
103 |
|
---|
104 | <p> <code>JUnitTask</code> can run a single specific
|
---|
105 | <code>JUnitTest</code> using the <code>test</code> element.</p>
|
---|
106 | For example, the following target <code><pre>
|
---|
107 | <target name="test-int-chars" depends="jar-test">
|
---|
108 | <echo message="testing international characters"/>
|
---|
109 | <junit printsummary="no" haltonfailure="yes" fork="false">
|
---|
110 | <classpath refid="classpath"/>
|
---|
111 | <formatter type="plain" usefile="false" />
|
---|
112 | <test name="org.apache.ecs.InternationalCharTest" />
|
---|
113 | </junit>
|
---|
114 | </target>
|
---|
115 | </pre></code>
|
---|
116 | <p>runs a single junit test
|
---|
117 | (<code>org.apache.ecs.InternationalCharTest</code>) in the current
|
---|
118 | VM using the path with id <code>classpath</code> as classpath and
|
---|
119 | presents the results formatted using the standard
|
---|
120 | <code>plain</code> formatter on the command line.</p>
|
---|
121 |
|
---|
122 | <p> This task can also run batches of tests. The
|
---|
123 | <code>batchtest</code> element creates a <code>BatchTest</code>
|
---|
124 | based on a fileset. This allows, for example, all classes found in
|
---|
125 | directory to be run as testcases.</p>
|
---|
126 |
|
---|
127 | <p>For example,</p><code><pre>
|
---|
128 | <target name="run-tests" depends="dump-info,compile-tests" if="junit.present">
|
---|
129 | <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
|
---|
130 | <jvmarg value="-classic"/>
|
---|
131 | <classpath refid="tests-classpath"/>
|
---|
132 | <sysproperty key="build.tests" value="${build.tests}"/>
|
---|
133 | <formatter type="brief" usefile="false" />
|
---|
134 | <batchtest>
|
---|
135 | <fileset dir="${tests.dir}">
|
---|
136 | <include name="**/*Test*" />
|
---|
137 | </fileset>
|
---|
138 | </batchtest>
|
---|
139 | </junit>
|
---|
140 | </target>
|
---|
141 | </pre></code>
|
---|
142 | <p>this target finds any classes with a <code>test</code> directory
|
---|
143 | anywhere in their path (under the top <code>${tests.dir}</code>, of
|
---|
144 | course) and creates <code>JUnitTest</code>'s for each one.</p>
|
---|
145 |
|
---|
146 | <p> Of course, <code><junit></code> and
|
---|
147 | <code><batch></code> elements can be combined for more
|
---|
148 | complex tests. For an example, see the ant <code>build.xml</code>
|
---|
149 | target <code>run-tests</code> (the second example is an edited
|
---|
150 | version).</p>
|
---|
151 |
|
---|
152 | <p> To spawn a new Java VM to prevent interferences between
|
---|
153 | different testcases, you need to enable <code>fork</code>. A
|
---|
154 | number of attributes and elements allow you to set up how this JVM
|
---|
155 | runs.
|
---|
156 | <P>
|
---|
157 |
|
---|
158 | <P>
|
---|
159 | <DL>
|
---|
160 | <DT><B>Since:</B></DT>
|
---|
161 | <DD>Ant 1.2</DD>
|
---|
162 | <DT><B>See Also:</B><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>,
|
---|
163 | <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></DL>
|
---|
164 | <HR>
|
---|
165 |
|
---|
166 | <P>
|
---|
167 | <!-- ======== NESTED CLASS SUMMARY ======== -->
|
---|
168 |
|
---|
169 | <A NAME="nested_class_summary"><!-- --></A>
|
---|
170 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
171 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
172 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
173 | <B>Nested Class Summary</B></FONT></TD>
|
---|
174 | </TR>
|
---|
175 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
176 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
177 | <CODE>static class</CODE></FONT></TD>
|
---|
178 | <TD><CODE><B><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></B></CODE>
|
---|
179 |
|
---|
180 | <BR>
|
---|
181 | These are the different forking options</TD>
|
---|
182 | </TR>
|
---|
183 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
184 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
185 | <CODE>static class</CODE></FONT></TD>
|
---|
186 | <TD><CODE><B><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></B></CODE>
|
---|
187 |
|
---|
188 | <BR>
|
---|
189 | Print summary enumeration values.</TD>
|
---|
190 | </TR>
|
---|
191 | </TABLE>
|
---|
192 |
|
---|
193 | <!-- =========== FIELD SUMMARY =========== -->
|
---|
194 |
|
---|
195 | <A NAME="field_summary"><!-- --></A>
|
---|
196 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
197 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
198 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
199 | <B>Field Summary</B></FONT></TD>
|
---|
200 | </TR>
|
---|
201 | </TABLE>
|
---|
202 | <A NAME="fields_inherited_from_class_org.apache.tools.ant.Task"><!-- --></A>
|
---|
203 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
204 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
205 | <TD><B>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></B></TD>
|
---|
206 | </TR>
|
---|
207 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
208 | <TD><CODE><A HREF="../../../../../../../org/apache/tools/ant/Task.html#description">description</A>, <A HREF="../../../../../../../org/apache/tools/ant/Task.html#location">location</A>, <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></TD>
|
---|
209 | </TR>
|
---|
210 | </TABLE>
|
---|
211 | <A NAME="fields_inherited_from_class_org.apache.tools.ant.ProjectComponent"><!-- --></A>
|
---|
212 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
213 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
214 | <TD><B>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></B></TD>
|
---|
215 | </TR>
|
---|
216 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
217 | <TD><CODE><A HREF="../../../../../../../org/apache/tools/ant/ProjectComponent.html#project">project</A></CODE></TD>
|
---|
218 | </TR>
|
---|
219 | </TABLE>
|
---|
220 |
|
---|
221 | <!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
---|
222 |
|
---|
223 | <A NAME="constructor_summary"><!-- --></A>
|
---|
224 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
225 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
226 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
227 | <B>Constructor Summary</B></FONT></TD>
|
---|
228 | </TR>
|
---|
229 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
230 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#JUnitTask()">JUnitTask</A></B>()</CODE>
|
---|
231 |
|
---|
232 | <BR>
|
---|
233 | Creates a new JUnitRunner and enables fork of a new Java VM.</TD>
|
---|
234 | </TR>
|
---|
235 | </TABLE>
|
---|
236 |
|
---|
237 | <!-- ========== METHOD SUMMARY =========== -->
|
---|
238 |
|
---|
239 | <A NAME="method_summary"><!-- --></A>
|
---|
240 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
241 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
242 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
243 | <B>Method Summary</B></FONT></TD>
|
---|
244 | </TR>
|
---|
245 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
246 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
247 | <CODE>protected void</CODE></FONT></TD>
|
---|
248 | <TD><CODE><B><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></B>(int exitValue,
|
---|
249 | boolean wasKilled,
|
---|
250 | <A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</A> test,
|
---|
251 | java.lang.String name)</CODE>
|
---|
252 |
|
---|
253 | <BR>
|
---|
254 | Logs information about failed tests, potentially stops
|
---|
255 | processing (by throwing a BuildException) if a failure/error
|
---|
256 | occured or sets a property.</TD>
|
---|
257 | </TR>
|
---|
258 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
259 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
260 | <CODE> void</CODE></FONT></TD>
|
---|
261 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addAssertions(org.apache.tools.ant.types.Assertions)">addAssertions</A></B>(<A HREF="../../../../../../../org/apache/tools/ant/types/Assertions.html" title="class in org.apache.tools.ant.types">Assertions</A> asserts)</CODE>
|
---|
262 |
|
---|
263 | <BR>
|
---|
264 | Assertions to enable in this program (if fork=true)</TD>
|
---|
265 | </TR>
|
---|
266 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
267 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
268 | <CODE>protected void</CODE></FONT></TD>
|
---|
269 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addClasspathEntry(java.lang.String)">addClasspathEntry</A></B>(java.lang.String resource)</CODE>
|
---|
270 |
|
---|
271 | <BR>
|
---|
272 | Search for the given resource and add the directory or archive
|
---|
273 | that contains it to the classpath.</TD>
|
---|
274 | </TR>
|
---|
275 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
276 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
277 | <CODE> void</CODE></FONT></TD>
|
---|
278 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addConfiguredSysproperty(org.apache.tools.ant.types.Environment.Variable)">addConfiguredSysproperty</A></B>(<A HREF="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</A> sysp)</CODE>
|
---|
279 |
|
---|
280 | <BR>
|
---|
281 | Adds a system property that tests can access.</TD>
|
---|
282 | </TR>
|
---|
283 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
284 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
285 | <CODE> void</CODE></FONT></TD>
|
---|
286 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addEnv(org.apache.tools.ant.types.Environment.Variable)">addEnv</A></B>(<A HREF="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</A> var)</CODE>
|
---|
287 |
|
---|
288 | <BR>
|
---|
289 | Adds an environment variable; used when forking.</TD>
|
---|
290 | </TR>
|
---|
291 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
292 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
293 | <CODE> void</CODE></FONT></TD>
|
---|
294 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addFormatter(org.apache.tools.ant.taskdefs.optional.junit.FormatterElement)">addFormatter</A></B>(<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>
|
---|
295 |
|
---|
296 | <BR>
|
---|
297 | Add a new formatter to all tests of this task.</TD>
|
---|
298 | </TR>
|
---|
299 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
300 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
301 | <CODE> void</CODE></FONT></TD>
|
---|
302 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addSysproperty(org.apache.tools.ant.types.Environment.Variable)">addSysproperty</A></B>(<A HREF="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</A> sysp)</CODE>
|
---|
303 |
|
---|
304 | <BR>
|
---|
305 | <B>Deprecated.</B> <I>since ant 1.6</I></TD>
|
---|
306 | </TR>
|
---|
307 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
308 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
309 | <CODE> void</CODE></FONT></TD>
|
---|
310 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addSyspropertyset(org.apache.tools.ant.types.PropertySet)">addSyspropertyset</A></B>(<A HREF="../../../../../../../org/apache/tools/ant/types/PropertySet.html" title="class in org.apache.tools.ant.types">PropertySet</A> sysp)</CODE>
|
---|
311 |
|
---|
312 | <BR>
|
---|
313 | Adds a set of properties that will be used as system properties
|
---|
314 | that tests can access.</TD>
|
---|
315 | </TR>
|
---|
316 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
317 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
318 | <CODE> void</CODE></FONT></TD>
|
---|
319 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#addTest(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)">addTest</A></B>(<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>
|
---|
320 |
|
---|
321 | <BR>
|
---|
322 | Add a new single testcase.</TD>
|
---|
323 | </TR>
|
---|
324 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
325 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
326 | <CODE>protected java.util.Enumeration</CODE></FONT></TD>
|
---|
327 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#allTests()">allTests</A></B>()</CODE>
|
---|
328 |
|
---|
329 | <BR>
|
---|
330 | return an enumeration listing each test, then each batchtest</TD>
|
---|
331 | </TR>
|
---|
332 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
333 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
334 | <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></FONT></TD>
|
---|
335 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createBatchTest()">createBatchTest</A></B>()</CODE>
|
---|
336 |
|
---|
337 | <BR>
|
---|
338 | Adds a set of tests based on pattern matching.</TD>
|
---|
339 | </TR>
|
---|
340 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
341 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
342 | <CODE> <A HREF="../../../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A></CODE></FONT></TD>
|
---|
343 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createBootclasspath()">createBootclasspath</A></B>()</CODE>
|
---|
344 |
|
---|
345 | <BR>
|
---|
346 | Adds a path to the bootclasspath.</TD>
|
---|
347 | </TR>
|
---|
348 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
349 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
350 | <CODE> <A HREF="../../../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A></CODE></FONT></TD>
|
---|
351 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createClasspath()">createClasspath</A></B>()</CODE>
|
---|
352 |
|
---|
353 | <BR>
|
---|
354 | Adds path to classpath used for tests.</TD>
|
---|
355 | </TR>
|
---|
356 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
357 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
358 | <CODE> <A HREF="../../../../../../../org/apache/tools/ant/types/Commandline.Argument.html" title="class in org.apache.tools.ant.types">Commandline.Argument</A></CODE></FONT></TD>
|
---|
359 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createJvmarg()">createJvmarg</A></B>()</CODE>
|
---|
360 |
|
---|
361 | <BR>
|
---|
362 | Adds a JVM argument; ignored if not forking.</TD>
|
---|
363 | </TR>
|
---|
364 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
365 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
366 | <CODE> <A HREF="../../../../../../../org/apache/tools/ant/types/Permissions.html" title="class in org.apache.tools.ant.types">Permissions</A></CODE></FONT></TD>
|
---|
367 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createPermissions()">createPermissions</A></B>()</CODE>
|
---|
368 |
|
---|
369 | <BR>
|
---|
370 | Sets the permissions for the application run inside the same JVM.</TD>
|
---|
371 | </TR>
|
---|
372 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
373 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
374 | <CODE>protected <A HREF="../../../../../../../org/apache/tools/ant/taskdefs/ExecuteWatchdog.html" title="class in org.apache.tools.ant.taskdefs">ExecuteWatchdog</A></CODE></FONT></TD>
|
---|
375 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#createWatchdog()">createWatchdog</A></B>()</CODE>
|
---|
376 |
|
---|
377 | <BR>
|
---|
378 | </TD>
|
---|
379 | </TR>
|
---|
380 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
381 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
382 | <CODE> void</CODE></FONT></TD>
|
---|
383 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#execute()">execute</A></B>()</CODE>
|
---|
384 |
|
---|
385 | <BR>
|
---|
386 | Runs the testcase.</TD>
|
---|
387 | </TR>
|
---|
388 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
389 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
390 | <CODE>protected void</CODE></FONT></TD>
|
---|
391 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#execute(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)">execute</A></B>(<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>
|
---|
392 |
|
---|
393 | <BR>
|
---|
394 | Run the tests.</TD>
|
---|
395 | </TR>
|
---|
396 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
397 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
398 | <CODE>protected void</CODE></FONT></TD>
|
---|
399 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#execute(java.util.List)">execute</A></B>(java.util.List tests)</CODE>
|
---|
400 |
|
---|
401 | <BR>
|
---|
402 | Execute a list of tests in a single forked Java VM.</TD>
|
---|
403 | </TR>
|
---|
404 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
405 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
406 | <CODE>protected java.util.Collection</CODE></FONT></TD>
|
---|
407 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#executeOrQueue(java.util.Enumeration, boolean)">executeOrQueue</A></B>(java.util.Enumeration testList,
|
---|
408 | boolean runIndividual)</CODE>
|
---|
409 |
|
---|
410 | <BR>
|
---|
411 | Executes all tests that don't need to be forked (or all tests
|
---|
412 | if the runIndividual argument is true.</TD>
|
---|
413 | </TR>
|
---|
414 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
415 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
416 | <CODE>protected <A HREF="../../../../../../../org/apache/tools/ant/types/CommandlineJava.html" title="class in org.apache.tools.ant.types">CommandlineJava</A></CODE></FONT></TD>
|
---|
417 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#getCommandline()">getCommandline</A></B>()</CODE>
|
---|
418 |
|
---|
419 | <BR>
|
---|
420 | </TD>
|
---|
421 | </TR>
|
---|
422 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
423 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
424 | <CODE>protected java.io.OutputStream</CODE></FONT></TD>
|
---|
425 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#getDefaultOutput()">getDefaultOutput</A></B>()</CODE>
|
---|
426 |
|
---|
427 | <BR>
|
---|
428 | Get the default output for a formatter.</TD>
|
---|
429 | </TR>
|
---|
430 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
431 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
432 | <CODE>protected java.util.Enumeration</CODE></FONT></TD>
|
---|
433 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#getIndividualTests()">getIndividualTests</A></B>()</CODE>
|
---|
434 |
|
---|
435 | <BR>
|
---|
436 | Merge all individual tests from the batchtest with all individual tests
|
---|
437 | and return an enumeration over all <tt>JUnitTest</tt>.</TD>
|
---|
438 | </TR>
|
---|
439 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
440 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
441 | <CODE>protected java.io.File</CODE></FONT></TD>
|
---|
442 | <TD><CODE><B><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></B>(<A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">FormatterElement</A> fe,
|
---|
443 | <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>
|
---|
444 |
|
---|
445 | <BR>
|
---|
446 | If the formatter sends output to a file, return that file.</TD>
|
---|
447 | </TR>
|
---|
448 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
449 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
450 | <CODE> void</CODE></FONT></TD>
|
---|
451 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#handleErrorFlush(java.lang.String)">handleErrorFlush</A></B>(java.lang.String output)</CODE>
|
---|
452 |
|
---|
453 | <BR>
|
---|
454 | Pass output sent to System.err to the TestRunner so it can
|
---|
455 | collect it for the formatters.</TD>
|
---|
456 | </TR>
|
---|
457 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
458 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
459 | <CODE> void</CODE></FONT></TD>
|
---|
460 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#handleErrorOutput(java.lang.String)">handleErrorOutput</A></B>(java.lang.String output)</CODE>
|
---|
461 |
|
---|
462 | <BR>
|
---|
463 | Pass output sent to System.err to the TestRunner so it can
|
---|
464 | collect it for the formatters.</TD>
|
---|
465 | </TR>
|
---|
466 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
467 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
468 | <CODE>protected void</CODE></FONT></TD>
|
---|
469 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#handleFlush(java.lang.String)">handleFlush</A></B>(java.lang.String output)</CODE>
|
---|
470 |
|
---|
471 | <BR>
|
---|
472 | Pass output sent to System.out to the TestRunner so it can
|
---|
473 | collect ot for the formatters.</TD>
|
---|
474 | </TR>
|
---|
475 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
476 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
477 | <CODE>protected int</CODE></FONT></TD>
|
---|
478 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#handleInput(byte[], int, int)">handleInput</A></B>(byte[] buffer,
|
---|
479 | int offset,
|
---|
480 | int length)</CODE>
|
---|
481 |
|
---|
482 | <BR>
|
---|
483 | Handle an input request by this task</TD>
|
---|
484 | </TR>
|
---|
485 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
486 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
487 | <CODE>protected void</CODE></FONT></TD>
|
---|
488 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#handleOutput(java.lang.String)">handleOutput</A></B>(java.lang.String output)</CODE>
|
---|
489 |
|
---|
490 | <BR>
|
---|
491 | Pass output sent to System.out to the TestRunner so it can
|
---|
492 | collect ot for the formatters.</TD>
|
---|
493 | </TR>
|
---|
494 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
495 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
496 | <CODE> void</CODE></FONT></TD>
|
---|
497 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#init()">init</A></B>()</CODE>
|
---|
498 |
|
---|
499 | <BR>
|
---|
500 | Adds the jars or directories containing Ant, this task and
|
---|
501 | JUnit to the classpath - this should make the forked JVM work
|
---|
502 | without having to specify them directly.</TD>
|
---|
503 | </TR>
|
---|
504 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
505 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
506 | <CODE> void</CODE></FONT></TD>
|
---|
507 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setDir(java.io.File)">setDir</A></B>(java.io.File dir)</CODE>
|
---|
508 |
|
---|
509 | <BR>
|
---|
510 | The directory to invoke the VM in.</TD>
|
---|
511 | </TR>
|
---|
512 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
513 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
514 | <CODE> void</CODE></FONT></TD>
|
---|
515 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setErrorProperty(java.lang.String)">setErrorProperty</A></B>(java.lang.String propertyName)</CODE>
|
---|
516 |
|
---|
517 | <BR>
|
---|
518 | Property to set to "true" if there is a error in a test.</TD>
|
---|
519 | </TR>
|
---|
520 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
521 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
522 | <CODE> void</CODE></FONT></TD>
|
---|
523 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFailureProperty(java.lang.String)">setFailureProperty</A></B>(java.lang.String propertyName)</CODE>
|
---|
524 |
|
---|
525 | <BR>
|
---|
526 | Property to set to "true" if there is a failure in a test.</TD>
|
---|
527 | </TR>
|
---|
528 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
529 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
530 | <CODE> void</CODE></FONT></TD>
|
---|
531 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFiltertrace(boolean)">setFiltertrace</A></B>(boolean value)</CODE>
|
---|
532 |
|
---|
533 | <BR>
|
---|
534 | If true, smartly filter the stack frames of
|
---|
535 | JUnit errors and failures before reporting them.</TD>
|
---|
536 | </TR>
|
---|
537 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
538 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
539 | <CODE> void</CODE></FONT></TD>
|
---|
540 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)">setFork</A></B>(boolean value)</CODE>
|
---|
541 |
|
---|
542 | <BR>
|
---|
543 | If true, JVM should be forked for each test.</TD>
|
---|
544 | </TR>
|
---|
545 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
546 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
547 | <CODE> void</CODE></FONT></TD>
|
---|
548 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setForkMode(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.ForkMode)">setForkMode</A></B>(<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>
|
---|
549 |
|
---|
550 | <BR>
|
---|
551 | 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.</TD>
|
---|
552 | </TR>
|
---|
553 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
554 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
555 | <CODE> void</CODE></FONT></TD>
|
---|
556 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setHaltonerror(boolean)">setHaltonerror</A></B>(boolean value)</CODE>
|
---|
557 |
|
---|
558 | <BR>
|
---|
559 | If true, stop the build process when there is an error in a test.</TD>
|
---|
560 | </TR>
|
---|
561 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
562 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
563 | <CODE> void</CODE></FONT></TD>
|
---|
564 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setHaltonfailure(boolean)">setHaltonfailure</A></B>(boolean value)</CODE>
|
---|
565 |
|
---|
566 | <BR>
|
---|
567 | If true, stop the build process if a test fails
|
---|
568 | (errors are considered failures as well).</TD>
|
---|
569 | </TR>
|
---|
570 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
571 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
572 | <CODE> void</CODE></FONT></TD>
|
---|
573 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setIncludeantruntime(boolean)">setIncludeantruntime</A></B>(boolean b)</CODE>
|
---|
574 |
|
---|
575 | <BR>
|
---|
576 | If true, include ant.jar, optional.jar and junit.jar in the forked VM.</TD>
|
---|
577 | </TR>
|
---|
578 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
579 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
580 | <CODE> void</CODE></FONT></TD>
|
---|
581 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setJvm(java.lang.String)">setJvm</A></B>(java.lang.String value)</CODE>
|
---|
582 |
|
---|
583 | <BR>
|
---|
584 | The command used to invoke the Java Virtual Machine,
|
---|
585 | default is 'java'.</TD>
|
---|
586 | </TR>
|
---|
587 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
588 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
589 | <CODE> void</CODE></FONT></TD>
|
---|
590 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setMaxmemory(java.lang.String)">setMaxmemory</A></B>(java.lang.String max)</CODE>
|
---|
591 |
|
---|
592 | <BR>
|
---|
593 | Set the maximum memory to be used by all forked JVMs.</TD>
|
---|
594 | </TR>
|
---|
595 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
596 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
597 | <CODE> void</CODE></FONT></TD>
|
---|
598 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setNewenvironment(boolean)">setNewenvironment</A></B>(boolean newenv)</CODE>
|
---|
599 |
|
---|
600 | <BR>
|
---|
601 | If true, use a new environment when forked.</TD>
|
---|
602 | </TR>
|
---|
603 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
604 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
605 | <CODE> void</CODE></FONT></TD>
|
---|
606 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setPrintsummary(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.SummaryAttribute)">setPrintsummary</A></B>(<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>
|
---|
607 |
|
---|
608 | <BR>
|
---|
609 | If true, print one-line statistics for each test, or "withOutAndErr"
|
---|
610 | to also show standard output and error.</TD>
|
---|
611 | </TR>
|
---|
612 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
613 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
614 | <CODE> void</CODE></FONT></TD>
|
---|
615 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setReloading(boolean)">setReloading</A></B>(boolean value)</CODE>
|
---|
616 |
|
---|
617 | <BR>
|
---|
618 | If true, force ant to re-classload all classes for each JUnit TestCase</TD>
|
---|
619 | </TR>
|
---|
620 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
621 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
622 | <CODE> void</CODE></FONT></TD>
|
---|
623 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setShowOutput(boolean)">setShowOutput</A></B>(boolean showOutput)</CODE>
|
---|
624 |
|
---|
625 | <BR>
|
---|
626 | If true, send any output generated by tests to Ant's logging system
|
---|
627 | as well as to the formatters.</TD>
|
---|
628 | </TR>
|
---|
629 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
630 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
631 | <CODE> void</CODE></FONT></TD>
|
---|
632 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setTempdir(java.io.File)">setTempdir</A></B>(java.io.File tmpDir)</CODE>
|
---|
633 |
|
---|
634 | <BR>
|
---|
635 | Where Ant should place temporary files.</TD>
|
---|
636 | </TR>
|
---|
637 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
638 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
639 | <CODE> void</CODE></FONT></TD>
|
---|
640 | <TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setTimeout(java.lang.Integer)">setTimeout</A></B>(java.lang.Integer value)</CODE>
|
---|
641 |
|
---|
642 | <BR>
|
---|
643 | Set the timeout value (in milliseconds).</TD>
|
---|
644 | </TR>
|
---|
645 | </TABLE>
|
---|
646 | <A NAME="methods_inherited_from_class_org.apache.tools.ant.Task"><!-- --></A>
|
---|
647 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
648 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
649 | <TD><B>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></B></TD>
|
---|
650 | </TR>
|
---|
651 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
652 | <TD><CODE><A HREF="../../../../../../../org/apache/tools/ant/Task.html#getDescription()">getDescription</A>, <A HREF="../../../../../../../org/apache/tools/ant/Task.html#getLocation()">getLocation</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#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#setDescription(java.lang.String)">setDescription</A>, <A HREF="../../../../../../../org/apache/tools/ant/Task.html#setLocation(org.apache.tools.ant.Location)">setLocation</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></TD>
|
---|
653 | </TR>
|
---|
654 | </TABLE>
|
---|
655 | <A NAME="methods_inherited_from_class_org.apache.tools.ant.ProjectComponent"><!-- --></A>
|
---|
656 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
657 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
658 | <TD><B>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></B></TD>
|
---|
659 | </TR>
|
---|
660 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
661 | <TD><CODE><A HREF="../../../../../../../org/apache/tools/ant/ProjectComponent.html#getProject()">getProject</A>, <A HREF="../../../../../../../org/apache/tools/ant/ProjectComponent.html#setProject(org.apache.tools.ant.Project)">setProject</A></CODE></TD>
|
---|
662 | </TR>
|
---|
663 | </TABLE>
|
---|
664 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
---|
665 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
666 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
667 | <TD><B>Methods inherited from class java.lang.Object</B></TD>
|
---|
668 | </TR>
|
---|
669 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
670 | <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
---|
671 | </TR>
|
---|
672 | </TABLE>
|
---|
673 |
|
---|
674 | <P>
|
---|
675 |
|
---|
676 | <!-- ============ FIELD DETAIL =========== -->
|
---|
677 |
|
---|
678 |
|
---|
679 | <!-- ========= CONSTRUCTOR DETAIL ======== -->
|
---|
680 |
|
---|
681 | <A NAME="constructor_detail"><!-- --></A>
|
---|
682 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
683 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
684 | <TD COLSPAN=1><FONT SIZE="+2">
|
---|
685 | <B>Constructor Detail</B></FONT></TD>
|
---|
686 | </TR>
|
---|
687 | </TABLE>
|
---|
688 |
|
---|
689 | <A NAME="JUnitTask()"><!-- --></A><H3>
|
---|
690 | JUnitTask</H3>
|
---|
691 | <PRE>
|
---|
692 | public <B>JUnitTask</B>()
|
---|
693 | throws java.lang.Exception</PRE>
|
---|
694 | <DL>
|
---|
695 | <DD>Creates a new JUnitRunner and enables fork of a new Java VM.
|
---|
696 | <P>
|
---|
697 |
|
---|
698 | <DT><B>Throws:</B>
|
---|
699 | <DD><CODE>java.lang.Exception</CODE> - under ??? circumstances<DT><B>Since:</B></DT>
|
---|
700 | <DD>Ant 1.2</DD>
|
---|
701 | </DL>
|
---|
702 |
|
---|
703 | <!-- ============ METHOD DETAIL ========== -->
|
---|
704 |
|
---|
705 | <A NAME="method_detail"><!-- --></A>
|
---|
706 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
707 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
708 | <TD COLSPAN=1><FONT SIZE="+2">
|
---|
709 | <B>Method Detail</B></FONT></TD>
|
---|
710 | </TR>
|
---|
711 | </TABLE>
|
---|
712 |
|
---|
713 | <A NAME="setReloading(boolean)"><!-- --></A><H3>
|
---|
714 | setReloading</H3>
|
---|
715 | <PRE>
|
---|
716 | public void <B>setReloading</B>(boolean value)</PRE>
|
---|
717 | <DL>
|
---|
718 | <DD>If true, force ant to re-classload all classes for each JUnit TestCase
|
---|
719 | <P>
|
---|
720 | <DD><DL>
|
---|
721 | <DT><B>Parameters:</B><DD><CODE>value</CODE> - force class reloading for each test case</DL>
|
---|
722 | </DD>
|
---|
723 | </DL>
|
---|
724 | <HR>
|
---|
725 |
|
---|
726 | <A NAME="setFiltertrace(boolean)"><!-- --></A><H3>
|
---|
727 | setFiltertrace</H3>
|
---|
728 | <PRE>
|
---|
729 | public void <B>setFiltertrace</B>(boolean value)</PRE>
|
---|
730 | <DL>
|
---|
731 | <DD>If true, smartly filter the stack frames of
|
---|
732 | JUnit errors and failures before reporting them.
|
---|
733 |
|
---|
734 | <p>This property is applied on all BatchTest (batchtest) and
|
---|
735 | JUnitTest (test) however it can possibly be overridden by their
|
---|
736 | own properties.</p>
|
---|
737 | <P>
|
---|
738 | <DD><DL>
|
---|
739 | <DT><B>Parameters:</B><DD><CODE>value</CODE> - <tt>false</tt> if it should not filter, otherwise
|
---|
740 | <tt>true<tt><DT><B>Since:</B></DT>
|
---|
741 | <DD>Ant 1.5</DD>
|
---|
742 | </DL>
|
---|
743 | </DD>
|
---|
744 | </DL>
|
---|
745 | <HR>
|
---|
746 |
|
---|
747 | <A NAME="setHaltonerror(boolean)"><!-- --></A><H3>
|
---|
748 | setHaltonerror</H3>
|
---|
749 | <PRE>
|
---|
750 | public void <B>setHaltonerror</B>(boolean value)</PRE>
|
---|
751 | <DL>
|
---|
752 | <DD>If true, stop the build process when there is an error in a test.
|
---|
753 | This property is applied on all BatchTest (batchtest) and JUnitTest
|
---|
754 | (test) however it can possibly be overridden by their own
|
---|
755 | properties.
|
---|
756 | <P>
|
---|
757 | <DD><DL>
|
---|
758 | <DT><B>Parameters:</B><DD><CODE>value</CODE> - <tt>true</tt> if it should halt, otherwise
|
---|
759 | <tt>false</tt><DT><B>Since:</B></DT>
|
---|
760 | <DD>Ant 1.2</DD>
|
---|
761 | </DL>
|
---|
762 | </DD>
|
---|
763 | </DL>
|
---|
764 | <HR>
|
---|
765 |
|
---|
766 | <A NAME="setErrorProperty(java.lang.String)"><!-- --></A><H3>
|
---|
767 | setErrorProperty</H3>
|
---|
768 | <PRE>
|
---|
769 | public void <B>setErrorProperty</B>(java.lang.String propertyName)</PRE>
|
---|
770 | <DL>
|
---|
771 | <DD>Property to set to "true" if there is a error in a test.
|
---|
772 |
|
---|
773 | <p>This property is applied on all BatchTest (batchtest) and
|
---|
774 | JUnitTest (test), however, it can possibly be overriden by
|
---|
775 | their own properties.</p>
|
---|
776 | <P>
|
---|
777 | <DD><DL>
|
---|
778 | <DT><B>Parameters:</B><DD><CODE>propertyName</CODE> - the name of the property to set in the
|
---|
779 | event of an error.<DT><B>Since:</B></DT>
|
---|
780 | <DD>Ant 1.4</DD>
|
---|
781 | </DL>
|
---|
782 | </DD>
|
---|
783 | </DL>
|
---|
784 | <HR>
|
---|
785 |
|
---|
786 | <A NAME="setHaltonfailure(boolean)"><!-- --></A><H3>
|
---|
787 | setHaltonfailure</H3>
|
---|
788 | <PRE>
|
---|
789 | public void <B>setHaltonfailure</B>(boolean value)</PRE>
|
---|
790 | <DL>
|
---|
791 | <DD>If true, stop the build process if a test fails
|
---|
792 | (errors are considered failures as well).
|
---|
793 | This property is applied on all BatchTest (batchtest) and
|
---|
794 | JUnitTest (test) however it can possibly be overridden by their
|
---|
795 | own properties.
|
---|
796 | <P>
|
---|
797 | <DD><DL>
|
---|
798 | <DT><B>Parameters:</B><DD><CODE>value</CODE> - <tt>true</tt> if it should halt, otherwise
|
---|
799 | <tt>false</tt><DT><B>Since:</B></DT>
|
---|
800 | <DD>Ant 1.2</DD>
|
---|
801 | </DL>
|
---|
802 | </DD>
|
---|
803 | </DL>
|
---|
804 | <HR>
|
---|
805 |
|
---|
806 | <A NAME="setFailureProperty(java.lang.String)"><!-- --></A><H3>
|
---|
807 | setFailureProperty</H3>
|
---|
808 | <PRE>
|
---|
809 | public void <B>setFailureProperty</B>(java.lang.String propertyName)</PRE>
|
---|
810 | <DL>
|
---|
811 | <DD>Property to set to "true" if there is a failure in a test.
|
---|
812 |
|
---|
813 | <p>This property is applied on all BatchTest (batchtest) and
|
---|
814 | JUnitTest (test), however, it can possibly be overriden by
|
---|
815 | their own properties.</p>
|
---|
816 | <P>
|
---|
817 | <DD><DL>
|
---|
818 | <DT><B>Parameters:</B><DD><CODE>propertyName</CODE> - the name of the property to set in the
|
---|
819 | event of an failure.<DT><B>Since:</B></DT>
|
---|
820 | <DD>Ant 1.4</DD>
|
---|
821 | </DL>
|
---|
822 | </DD>
|
---|
823 | </DL>
|
---|
824 | <HR>
|
---|
825 |
|
---|
826 | <A NAME="setFork(boolean)"><!-- --></A><H3>
|
---|
827 | setFork</H3>
|
---|
828 | <PRE>
|
---|
829 | public void <B>setFork</B>(boolean value)</PRE>
|
---|
830 | <DL>
|
---|
831 | <DD>If true, JVM should be forked for each test.
|
---|
832 |
|
---|
833 | <p>It avoids interference between testcases and possibly avoids
|
---|
834 | hanging the build. this property is applied on all BatchTest
|
---|
835 | (batchtest) and JUnitTest (test) however it can possibly be
|
---|
836 | overridden by their own properties.</p>
|
---|
837 | <P>
|
---|
838 | <DD><DL>
|
---|
839 | <DT><B>Parameters:</B><DD><CODE>value</CODE> - <tt>true</tt> if a JVM should be forked, otherwise
|
---|
840 | <tt>false</tt><DT><B>Since:</B></DT>
|
---|
841 | <DD>Ant 1.2</DD>
|
---|
842 | <DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setTimeout(java.lang.Integer)"><CODE>setTimeout(java.lang.Integer)</CODE></A></DL>
|
---|
843 | </DD>
|
---|
844 | </DL>
|
---|
845 | <HR>
|
---|
846 |
|
---|
847 | <A NAME="setForkMode(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.ForkMode)"><!-- --></A><H3>
|
---|
848 | setForkMode</H3>
|
---|
849 | <PRE>
|
---|
850 | public void <B>setForkMode</B>(<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>
|
---|
851 | <DL>
|
---|
852 | <DD>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.
|
---|
853 |
|
---|
854 | <p>Possible values are "once", "perTest" and "perBatch". If
|
---|
855 | set to "once", only a single Java VM will be forked for all
|
---|
856 | tests, with "perTest" (the default) each test will run in a
|
---|
857 | fresh Java VM and "perBatch" will run all tests from the same
|
---|
858 | <batchtest> in the same Java VM.</p>
|
---|
859 |
|
---|
860 | <p>This attribute will be ignored if tests run in the same VM
|
---|
861 | as Ant.</p>
|
---|
862 |
|
---|
863 | <p>Only tests with the same configuration of haltonerror,
|
---|
864 | haltonfailure, errorproperty, failureproperty and filtertrace
|
---|
865 | can share a forked Java VM, so even if you set the value to
|
---|
866 | "once", Ant may need to fork mutliple VMs.</p>
|
---|
867 | <P>
|
---|
868 | <DD><DL>
|
---|
869 | <DT><B>Since:</B></DT>
|
---|
870 | <DD>Ant 1.6.2</DD>
|
---|
871 | </DL>
|
---|
872 | </DD>
|
---|
873 | </DL>
|
---|
874 | <HR>
|
---|
875 |
|
---|
876 | <A NAME="setPrintsummary(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.SummaryAttribute)"><!-- --></A><H3>
|
---|
877 | setPrintsummary</H3>
|
---|
878 | <PRE>
|
---|
879 | public void <B>setPrintsummary</B>(<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>
|
---|
880 | <DL>
|
---|
881 | <DD>If true, print one-line statistics for each test, or "withOutAndErr"
|
---|
882 | to also show standard output and error.
|
---|
883 |
|
---|
884 | Can take the values on, off, and withOutAndErr.
|
---|
885 | <P>
|
---|
886 | <DD><DL>
|
---|
887 | <DT><B>Parameters:</B><DD><CODE>value</CODE> - <tt>true</tt> to print a summary,
|
---|
888 | <tt>withOutAndErr</tt> to include the test's output as
|
---|
889 | well, <tt>false</tt> otherwise.<DT><B>Since:</B></DT>
|
---|
890 | <DD>Ant 1.2</DD>
|
---|
891 | <DT><B>See Also:</B><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></DL>
|
---|
892 | </DD>
|
---|
893 | </DL>
|
---|
894 | <HR>
|
---|
895 |
|
---|
896 | <A NAME="setTimeout(java.lang.Integer)"><!-- --></A><H3>
|
---|
897 | setTimeout</H3>
|
---|
898 | <PRE>
|
---|
899 | public void <B>setTimeout</B>(java.lang.Integer value)</PRE>
|
---|
900 | <DL>
|
---|
901 | <DD>Set the timeout value (in milliseconds).
|
---|
902 |
|
---|
903 | <p>If the test is running for more than this value, the test
|
---|
904 | will be canceled. (works only when in 'fork' mode).</p>
|
---|
905 | <P>
|
---|
906 | <DD><DL>
|
---|
907 | <DT><B>Parameters:</B><DD><CODE>value</CODE> - the maximum time (in milliseconds) allowed before
|
---|
908 | declaring the test as 'timed-out'<DT><B>Since:</B></DT>
|
---|
909 | <DD>Ant 1.2</DD>
|
---|
910 | <DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)"><CODE>setFork(boolean)</CODE></A></DL>
|
---|
911 | </DD>
|
---|
912 | </DL>
|
---|
913 | <HR>
|
---|
914 |
|
---|
915 | <A NAME="setMaxmemory(java.lang.String)"><!-- --></A><H3>
|
---|
916 | setMaxmemory</H3>
|
---|
917 | <PRE>
|
---|
918 | public void <B>setMaxmemory</B>(java.lang.String max)</PRE>
|
---|
919 | <DL>
|
---|
920 | <DD>Set the maximum memory to be used by all forked JVMs.
|
---|
921 | <P>
|
---|
922 | <DD><DL>
|
---|
923 | <DT><B>Parameters:</B><DD><CODE>max</CODE> - the value as defined by <tt>-mx</tt> or <tt>-Xmx</tt>
|
---|
924 | in the java command line options.<DT><B>Since:</B></DT>
|
---|
925 | <DD>Ant 1.2</DD>
|
---|
926 | </DL>
|
---|
927 | </DD>
|
---|
928 | </DL>
|
---|
929 | <HR>
|
---|
930 |
|
---|
931 | <A NAME="setJvm(java.lang.String)"><!-- --></A><H3>
|
---|
932 | setJvm</H3>
|
---|
933 | <PRE>
|
---|
934 | public void <B>setJvm</B>(java.lang.String value)</PRE>
|
---|
935 | <DL>
|
---|
936 | <DD>The command used to invoke the Java Virtual Machine,
|
---|
937 | default is 'java'. The command is resolved by
|
---|
938 | java.lang.Runtime.exec(). Ignored if fork is disabled.
|
---|
939 | <P>
|
---|
940 | <DD><DL>
|
---|
941 | <DT><B>Parameters:</B><DD><CODE>value</CODE> - the new VM to use instead of <tt>java</tt><DT><B>Since:</B></DT>
|
---|
942 | <DD>Ant 1.2</DD>
|
---|
943 | <DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)"><CODE>setFork(boolean)</CODE></A></DL>
|
---|
944 | </DD>
|
---|
945 | </DL>
|
---|
946 | <HR>
|
---|
947 |
|
---|
948 | <A NAME="createJvmarg()"><!-- --></A><H3>
|
---|
949 | createJvmarg</H3>
|
---|
950 | <PRE>
|
---|
951 | public <A HREF="../../../../../../../org/apache/tools/ant/types/Commandline.Argument.html" title="class in org.apache.tools.ant.types">Commandline.Argument</A> <B>createJvmarg</B>()</PRE>
|
---|
952 | <DL>
|
---|
953 | <DD>Adds a JVM argument; ignored if not forking.
|
---|
954 | <P>
|
---|
955 | <DD><DL>
|
---|
956 |
|
---|
957 | <DT><B>Returns:</B><DD>create a new JVM argument so that any argument can be
|
---|
958 | passed to the JVM.<DT><B>Since:</B></DT>
|
---|
959 | <DD>Ant 1.2</DD>
|
---|
960 | <DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)"><CODE>setFork(boolean)</CODE></A></DL>
|
---|
961 | </DD>
|
---|
962 | </DL>
|
---|
963 | <HR>
|
---|
964 |
|
---|
965 | <A NAME="setDir(java.io.File)"><!-- --></A><H3>
|
---|
966 | setDir</H3>
|
---|
967 | <PRE>
|
---|
968 | public void <B>setDir</B>(java.io.File dir)</PRE>
|
---|
969 | <DL>
|
---|
970 | <DD>The directory to invoke the VM in. Ignored if no JVM is forked.
|
---|
971 | <P>
|
---|
972 | <DD><DL>
|
---|
973 | <DT><B>Parameters:</B><DD><CODE>dir</CODE> - the directory to invoke the JVM from.<DT><B>Since:</B></DT>
|
---|
974 | <DD>Ant 1.2</DD>
|
---|
975 | <DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html#setFork(boolean)"><CODE>setFork(boolean)</CODE></A></DL>
|
---|
976 | </DD>
|
---|
977 | </DL>
|
---|
978 | <HR>
|
---|
979 |
|
---|
980 | <A NAME="addSysproperty(org.apache.tools.ant.types.Environment.Variable)"><!-- --></A><H3>
|
---|
981 | addSysproperty</H3>
|
---|
982 | <PRE>
|
---|
983 | public void <B>addSysproperty</B>(<A HREF="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</A> sysp)</PRE>
|
---|
984 | <DL>
|
---|
985 | <DD><B>Deprecated.</B> <I>since ant 1.6</I>
|
---|
986 | <P>
|
---|
987 | <DD>Adds a system property that tests can access.
|
---|
988 | This might be useful to tranfer Ant properties to the
|
---|
989 | testcases when JVM forking is not enabled.
|
---|
990 | <P>
|
---|
991 | <DD><DL>
|
---|
992 | <DT><B>Parameters:</B><DD><CODE>sysp</CODE> - environment variable to add<DT><B>Since:</B></DT>
|
---|
993 | <DD>Ant 1.3</DD>
|
---|
994 | </DL>
|
---|
995 | </DD>
|
---|
996 | </DL>
|
---|
997 | <HR>
|
---|
998 |
|
---|
999 | <A NAME="addConfiguredSysproperty(org.apache.tools.ant.types.Environment.Variable)"><!-- --></A><H3>
|
---|
1000 | addConfiguredSysproperty</H3>
|
---|
1001 | <PRE>
|
---|
1002 | public void <B>addConfiguredSysproperty</B>(<A HREF="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</A> sysp)</PRE>
|
---|
1003 | <DL>
|
---|
1004 | <DD>Adds a system property that tests can access.
|
---|
1005 | This might be useful to tranfer Ant properties to the
|
---|
1006 | testcases when JVM forking is not enabled.
|
---|
1007 | <P>
|
---|
1008 | <DD><DL>
|
---|
1009 | <DT><B>Parameters:</B><DD><CODE>sysp</CODE> - new environment variable to add<DT><B>Since:</B></DT>
|
---|
1010 | <DD>Ant 1.6</DD>
|
---|
1011 | </DL>
|
---|
1012 | </DD>
|
---|
1013 | </DL>
|
---|
1014 | <HR>
|
---|
1015 |
|
---|
1016 | <A NAME="addSyspropertyset(org.apache.tools.ant.types.PropertySet)"><!-- --></A><H3>
|
---|
1017 | addSyspropertyset</H3>
|
---|
1018 | <PRE>
|
---|
1019 | public void <B>addSyspropertyset</B>(<A HREF="../../../../../../../org/apache/tools/ant/types/PropertySet.html" title="class in org.apache.tools.ant.types">PropertySet</A> sysp)</PRE>
|
---|
1020 | <DL>
|
---|
1021 | <DD>Adds a set of properties that will be used as system properties
|
---|
1022 | that tests can access.
|
---|
1023 |
|
---|
1024 | This might be useful to tranfer Ant properties to the
|
---|
1025 | testcases when JVM forking is not enabled.
|
---|
1026 | <P>
|
---|
1027 | <DD><DL>
|
---|
1028 | <DT><B>Parameters:</B><DD><CODE>sysp</CODE> - set of properties to be added<DT><B>Since:</B></DT>
|
---|
1029 | <DD>Ant 1.6</DD>
|
---|
1030 | </DL>
|
---|
1031 | </DD>
|
---|
1032 | </DL>
|
---|
1033 | <HR>
|
---|
1034 |
|
---|
1035 | <A NAME="createClasspath()"><!-- --></A><H3>
|
---|
1036 | createClasspath</H3>
|
---|
1037 | <PRE>
|
---|
1038 | public <A HREF="../../../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> <B>createClasspath</B>()</PRE>
|
---|
1039 | <DL>
|
---|
1040 | <DD>Adds path to classpath used for tests.
|
---|
1041 | <P>
|
---|
1042 | <DD><DL>
|
---|
1043 |
|
---|
1044 | <DT><B>Returns:</B><DD>reference to the classpath in the embedded java command line<DT><B>Since:</B></DT>
|
---|
1045 | <DD>Ant 1.2</DD>
|
---|
1046 | </DL>
|
---|
1047 | </DD>
|
---|
1048 | </DL>
|
---|
1049 | <HR>
|
---|
1050 |
|
---|
1051 | <A NAME="createBootclasspath()"><!-- --></A><H3>
|
---|
1052 | createBootclasspath</H3>
|
---|
1053 | <PRE>
|
---|
1054 | public <A HREF="../../../../../../../org/apache/tools/ant/types/Path.html" title="class in org.apache.tools.ant.types">Path</A> <B>createBootclasspath</B>()</PRE>
|
---|
1055 | <DL>
|
---|
1056 | <DD>Adds a path to the bootclasspath.
|
---|
1057 | <P>
|
---|
1058 | <DD><DL>
|
---|
1059 |
|
---|
1060 | <DT><B>Returns:</B><DD>reference to the bootclasspath in the embedded java command line<DT><B>Since:</B></DT>
|
---|
1061 | <DD>Ant 1.6</DD>
|
---|
1062 | </DL>
|
---|
1063 | </DD>
|
---|
1064 | </DL>
|
---|
1065 | <HR>
|
---|
1066 |
|
---|
1067 | <A NAME="addEnv(org.apache.tools.ant.types.Environment.Variable)"><!-- --></A><H3>
|
---|
1068 | addEnv</H3>
|
---|
1069 | <PRE>
|
---|
1070 | public void <B>addEnv</B>(<A HREF="../../../../../../../org/apache/tools/ant/types/Environment.Variable.html" title="class in org.apache.tools.ant.types">Environment.Variable</A> var)</PRE>
|
---|
1071 | <DL>
|
---|
1072 | <DD>Adds an environment variable; used when forking.
|
---|
1073 |
|
---|
1074 | <p>Will be ignored if we are not forking a new VM.</p>
|
---|
1075 | <P>
|
---|
1076 | <DD><DL>
|
---|
1077 | <DT><B>Parameters:</B><DD><CODE>var</CODE> - environment variable to be added<DT><B>Since:</B></DT>
|
---|
1078 | <DD>Ant 1.5</DD>
|
---|
1079 | </DL>
|
---|
1080 | </DD>
|
---|
1081 | </DL>
|
---|
1082 | <HR>
|
---|
1083 |
|
---|
1084 | <A NAME="setNewenvironment(boolean)"><!-- --></A><H3>
|
---|
1085 | setNewenvironment</H3>
|
---|
1086 | <PRE>
|
---|
1087 | public void <B>setNewenvironment</B>(boolean newenv)</PRE>
|
---|
1088 | <DL>
|
---|
1089 | <DD>If true, use a new environment when forked.
|
---|
1090 |
|
---|
1091 | <p>Will be ignored if we are not forking a new VM.</p>
|
---|
1092 | <P>
|
---|
1093 | <DD><DL>
|
---|
1094 | <DT><B>Parameters:</B><DD><CODE>newenv</CODE> - boolean indicating if setting a new environment is wished<DT><B>Since:</B></DT>
|
---|
1095 | <DD>Ant 1.5</DD>
|
---|
1096 | </DL>
|
---|
1097 | </DD>
|
---|
1098 | </DL>
|
---|
1099 | <HR>
|
---|
1100 |
|
---|
1101 | <A NAME="addTest(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)"><!-- --></A><H3>
|
---|
1102 | addTest</H3>
|
---|
1103 | <PRE>
|
---|
1104 | public void <B>addTest</B>(<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>
|
---|
1105 | <DL>
|
---|
1106 | <DD>Add a new single testcase.
|
---|
1107 | <P>
|
---|
1108 | <DD><DL>
|
---|
1109 | <DT><B>Parameters:</B><DD><CODE>test</CODE> - a new single testcase<DT><B>Since:</B></DT>
|
---|
1110 | <DD>Ant 1.2</DD>
|
---|
1111 | <DT><B>See Also:</B><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></DL>
|
---|
1112 | </DD>
|
---|
1113 | </DL>
|
---|
1114 | <HR>
|
---|
1115 |
|
---|
1116 | <A NAME="createBatchTest()"><!-- --></A><H3>
|
---|
1117 | createBatchTest</H3>
|
---|
1118 | <PRE>
|
---|
1119 | public <A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/BatchTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">BatchTest</A> <B>createBatchTest</B>()</PRE>
|
---|
1120 | <DL>
|
---|
1121 | <DD>Adds a set of tests based on pattern matching.
|
---|
1122 | <P>
|
---|
1123 | <DD><DL>
|
---|
1124 |
|
---|
1125 | <DT><B>Returns:</B><DD>a new instance of a batch test.<DT><B>Since:</B></DT>
|
---|
1126 | <DD>Ant 1.2</DD>
|
---|
1127 | <DT><B>See Also:</B><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></DL>
|
---|
1128 | </DD>
|
---|
1129 | </DL>
|
---|
1130 | <HR>
|
---|
1131 |
|
---|
1132 | <A NAME="addFormatter(org.apache.tools.ant.taskdefs.optional.junit.FormatterElement)"><!-- --></A><H3>
|
---|
1133 | addFormatter</H3>
|
---|
1134 | <PRE>
|
---|
1135 | public void <B>addFormatter</B>(<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>
|
---|
1136 | <DL>
|
---|
1137 | <DD>Add a new formatter to all tests of this task.
|
---|
1138 | <P>
|
---|
1139 | <DD><DL>
|
---|
1140 | <DT><B>Parameters:</B><DD><CODE>fe</CODE> - formatter element<DT><B>Since:</B></DT>
|
---|
1141 | <DD>Ant 1.2</DD>
|
---|
1142 | </DL>
|
---|
1143 | </DD>
|
---|
1144 | </DL>
|
---|
1145 | <HR>
|
---|
1146 |
|
---|
1147 | <A NAME="setIncludeantruntime(boolean)"><!-- --></A><H3>
|
---|
1148 | setIncludeantruntime</H3>
|
---|
1149 | <PRE>
|
---|
1150 | public void <B>setIncludeantruntime</B>(boolean b)</PRE>
|
---|
1151 | <DL>
|
---|
1152 | <DD>If true, include ant.jar, optional.jar and junit.jar in the forked VM.
|
---|
1153 | <P>
|
---|
1154 | <DD><DL>
|
---|
1155 | <DT><B>Parameters:</B><DD><CODE>b</CODE> - include ant run time yes or no<DT><B>Since:</B></DT>
|
---|
1156 | <DD>Ant 1.5</DD>
|
---|
1157 | </DL>
|
---|
1158 | </DD>
|
---|
1159 | </DL>
|
---|
1160 | <HR>
|
---|
1161 |
|
---|
1162 | <A NAME="setShowOutput(boolean)"><!-- --></A><H3>
|
---|
1163 | setShowOutput</H3>
|
---|
1164 | <PRE>
|
---|
1165 | public void <B>setShowOutput</B>(boolean showOutput)</PRE>
|
---|
1166 | <DL>
|
---|
1167 | <DD>If true, send any output generated by tests to Ant's logging system
|
---|
1168 | as well as to the formatters.
|
---|
1169 | By default only the formatters receive the output.
|
---|
1170 |
|
---|
1171 | <p>Output will always be passed to the formatters and not by
|
---|
1172 | shown by default. This option should for example be set for
|
---|
1173 | tests that are interactive and prompt the user to do
|
---|
1174 | something.</p>
|
---|
1175 | <P>
|
---|
1176 | <DD><DL>
|
---|
1177 | <DT><B>Parameters:</B><DD><CODE>showOutput</CODE> - if true, send output to Ant's logging system too<DT><B>Since:</B></DT>
|
---|
1178 | <DD>Ant 1.5</DD>
|
---|
1179 | </DL>
|
---|
1180 | </DD>
|
---|
1181 | </DL>
|
---|
1182 | <HR>
|
---|
1183 |
|
---|
1184 | <A NAME="addAssertions(org.apache.tools.ant.types.Assertions)"><!-- --></A><H3>
|
---|
1185 | addAssertions</H3>
|
---|
1186 | <PRE>
|
---|
1187 | public void <B>addAssertions</B>(<A HREF="../../../../../../../org/apache/tools/ant/types/Assertions.html" title="class in org.apache.tools.ant.types">Assertions</A> asserts)</PRE>
|
---|
1188 | <DL>
|
---|
1189 | <DD>Assertions to enable in this program (if fork=true)
|
---|
1190 | <P>
|
---|
1191 | <DD><DL>
|
---|
1192 | <DT><B>Parameters:</B><DD><CODE>asserts</CODE> - assertion set<DT><B>Since:</B></DT>
|
---|
1193 | <DD>Ant 1.6</DD>
|
---|
1194 | </DL>
|
---|
1195 | </DD>
|
---|
1196 | </DL>
|
---|
1197 | <HR>
|
---|
1198 |
|
---|
1199 | <A NAME="createPermissions()"><!-- --></A><H3>
|
---|
1200 | createPermissions</H3>
|
---|
1201 | <PRE>
|
---|
1202 | public <A HREF="../../../../../../../org/apache/tools/ant/types/Permissions.html" title="class in org.apache.tools.ant.types">Permissions</A> <B>createPermissions</B>()</PRE>
|
---|
1203 | <DL>
|
---|
1204 | <DD>Sets the permissions for the application run inside the same JVM.
|
---|
1205 | <P>
|
---|
1206 | <DD><DL>
|
---|
1207 |
|
---|
1208 | <DT><B>Returns:</B><DD>.<DT><B>Since:</B></DT>
|
---|
1209 | <DD>Ant 1.6</DD>
|
---|
1210 | </DL>
|
---|
1211 | </DD>
|
---|
1212 | </DL>
|
---|
1213 | <HR>
|
---|
1214 |
|
---|
1215 | <A NAME="setTempdir(java.io.File)"><!-- --></A><H3>
|
---|
1216 | setTempdir</H3>
|
---|
1217 | <PRE>
|
---|
1218 | public void <B>setTempdir</B>(java.io.File tmpDir)</PRE>
|
---|
1219 | <DL>
|
---|
1220 | <DD>Where Ant should place temporary files.
|
---|
1221 | <P>
|
---|
1222 | <DD><DL>
|
---|
1223 | <DT><B>Parameters:</B><DD><CODE>tmpDir</CODE> - location where temporary files should go to<DT><B>Since:</B></DT>
|
---|
1224 | <DD>Ant 1.6</DD>
|
---|
1225 | </DL>
|
---|
1226 | </DD>
|
---|
1227 | </DL>
|
---|
1228 | <HR>
|
---|
1229 |
|
---|
1230 | <A NAME="init()"><!-- --></A><H3>
|
---|
1231 | init</H3>
|
---|
1232 | <PRE>
|
---|
1233 | public void <B>init</B>()</PRE>
|
---|
1234 | <DL>
|
---|
1235 | <DD>Adds the jars or directories containing Ant, this task and
|
---|
1236 | JUnit to the classpath - this should make the forked JVM work
|
---|
1237 | without having to specify them directly.
|
---|
1238 | <P>
|
---|
1239 | <DD><DL>
|
---|
1240 | <DT><B>Overrides:</B><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></DL>
|
---|
1241 | </DD>
|
---|
1242 | <DD><DL>
|
---|
1243 | <DT><B>Since:</B></DT>
|
---|
1244 | <DD>Ant 1.4</DD>
|
---|
1245 | </DL>
|
---|
1246 | </DD>
|
---|
1247 | </DL>
|
---|
1248 | <HR>
|
---|
1249 |
|
---|
1250 | <A NAME="execute()"><!-- --></A><H3>
|
---|
1251 | execute</H3>
|
---|
1252 | <PRE>
|
---|
1253 | public void <B>execute</B>()
|
---|
1254 | throws <A HREF="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
|
---|
1255 | <DL>
|
---|
1256 | <DD>Runs the testcase.
|
---|
1257 | <P>
|
---|
1258 | <DD><DL>
|
---|
1259 | <DT><B>Overrides:</B><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></DL>
|
---|
1260 | </DD>
|
---|
1261 | <DD><DL>
|
---|
1262 |
|
---|
1263 | <DT><B>Throws:</B>
|
---|
1264 | <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<DT><B>Since:</B></DT>
|
---|
1265 | <DD>Ant 1.2</DD>
|
---|
1266 | </DL>
|
---|
1267 | </DD>
|
---|
1268 | </DL>
|
---|
1269 | <HR>
|
---|
1270 |
|
---|
1271 | <A NAME="execute(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)"><!-- --></A><H3>
|
---|
1272 | execute</H3>
|
---|
1273 | <PRE>
|
---|
1274 | protected void <B>execute</B>(<A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</A> arg)
|
---|
1275 | throws <A HREF="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
|
---|
1276 | <DL>
|
---|
1277 | <DD>Run the tests.
|
---|
1278 | <P>
|
---|
1279 | <DD><DL>
|
---|
1280 | <DT><B>Parameters:</B><DD><CODE>arg</CODE> - one JunitTest
|
---|
1281 | <DT><B>Throws:</B>
|
---|
1282 | <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</DL>
|
---|
1283 | </DD>
|
---|
1284 | </DL>
|
---|
1285 | <HR>
|
---|
1286 |
|
---|
1287 | <A NAME="execute(java.util.List)"><!-- --></A><H3>
|
---|
1288 | execute</H3>
|
---|
1289 | <PRE>
|
---|
1290 | protected void <B>execute</B>(java.util.List tests)
|
---|
1291 | throws <A HREF="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
|
---|
1292 | <DL>
|
---|
1293 | <DD>Execute a list of tests in a single forked Java VM.
|
---|
1294 | <P>
|
---|
1295 | <DD><DL>
|
---|
1296 |
|
---|
1297 | <DT><B>Throws:</B>
|
---|
1298 | <DD><CODE><A HREF="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE></DL>
|
---|
1299 | </DD>
|
---|
1300 | </DL>
|
---|
1301 | <HR>
|
---|
1302 |
|
---|
1303 | <A NAME="handleOutput(java.lang.String)"><!-- --></A><H3>
|
---|
1304 | handleOutput</H3>
|
---|
1305 | <PRE>
|
---|
1306 | protected void <B>handleOutput</B>(java.lang.String output)</PRE>
|
---|
1307 | <DL>
|
---|
1308 | <DD>Pass output sent to System.out to the TestRunner so it can
|
---|
1309 | collect ot for the formatters.
|
---|
1310 | <P>
|
---|
1311 | <DD><DL>
|
---|
1312 | <DT><B>Overrides:</B><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></DL>
|
---|
1313 | </DD>
|
---|
1314 | <DD><DL>
|
---|
1315 | <DT><B>Parameters:</B><DD><CODE>output</CODE> - output coming from System.out<DT><B>Since:</B></DT>
|
---|
1316 | <DD>Ant 1.5</DD>
|
---|
1317 | </DL>
|
---|
1318 | </DD>
|
---|
1319 | </DL>
|
---|
1320 | <HR>
|
---|
1321 |
|
---|
1322 | <A NAME="handleInput(byte[], int, int)"><!-- --></A><H3>
|
---|
1323 | handleInput</H3>
|
---|
1324 | <PRE>
|
---|
1325 | protected int <B>handleInput</B>(byte[] buffer,
|
---|
1326 | int offset,
|
---|
1327 | int length)
|
---|
1328 | throws java.io.IOException</PRE>
|
---|
1329 | <DL>
|
---|
1330 | <DD><B>Description copied from class: <CODE><A HREF="../../../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></CODE></B></DD>
|
---|
1331 | <DD>Handle an input request by this task
|
---|
1332 | <P>
|
---|
1333 | <DD><DL>
|
---|
1334 | <DT><B>Overrides:</B><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></DL>
|
---|
1335 | </DD>
|
---|
1336 | <DD><DL>
|
---|
1337 | <DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer into which data is to be read.<DD><CODE>offset</CODE> - the offset into the buffer at which data is stored.<DD><CODE>length</CODE> - the amount of data to read
|
---|
1338 | <DT><B>Returns:</B><DD>the number of bytes read
|
---|
1339 | <DT><B>Throws:</B>
|
---|
1340 | <DD><CODE>java.io.IOException</CODE> - if the data cannot be read<DT><B>Since:</B></DT>
|
---|
1341 | <DD>Ant 1.6</DD>
|
---|
1342 | <DT><B>See Also:</B><DD><A HREF="../../../../../../../org/apache/tools/ant/Task.html#handleInput(byte[], int, int)"><CODE>Task.handleInput(byte[], int, int)</CODE></A></DL>
|
---|
1343 | </DD>
|
---|
1344 | </DL>
|
---|
1345 | <HR>
|
---|
1346 |
|
---|
1347 | <A NAME="handleFlush(java.lang.String)"><!-- --></A><H3>
|
---|
1348 | handleFlush</H3>
|
---|
1349 | <PRE>
|
---|
1350 | protected void <B>handleFlush</B>(java.lang.String output)</PRE>
|
---|
1351 | <DL>
|
---|
1352 | <DD>Pass output sent to System.out to the TestRunner so it can
|
---|
1353 | collect ot for the formatters.
|
---|
1354 | <P>
|
---|
1355 | <DD><DL>
|
---|
1356 | <DT><B>Overrides:</B><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></DL>
|
---|
1357 | </DD>
|
---|
1358 | <DD><DL>
|
---|
1359 | <DT><B>Parameters:</B><DD><CODE>output</CODE> - output coming from System.out<DT><B>Since:</B></DT>
|
---|
1360 | <DD>Ant 1.5.2</DD>
|
---|
1361 | </DL>
|
---|
1362 | </DD>
|
---|
1363 | </DL>
|
---|
1364 | <HR>
|
---|
1365 |
|
---|
1366 | <A NAME="handleErrorOutput(java.lang.String)"><!-- --></A><H3>
|
---|
1367 | handleErrorOutput</H3>
|
---|
1368 | <PRE>
|
---|
1369 | public void <B>handleErrorOutput</B>(java.lang.String output)</PRE>
|
---|
1370 | <DL>
|
---|
1371 | <DD>Pass output sent to System.err to the TestRunner so it can
|
---|
1372 | collect it for the formatters.
|
---|
1373 | <P>
|
---|
1374 | <DD><DL>
|
---|
1375 | <DT><B>Overrides:</B><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></DL>
|
---|
1376 | </DD>
|
---|
1377 | <DD><DL>
|
---|
1378 | <DT><B>Parameters:</B><DD><CODE>output</CODE> - output coming from System.err<DT><B>Since:</B></DT>
|
---|
1379 | <DD>Ant 1.5</DD>
|
---|
1380 | </DL>
|
---|
1381 | </DD>
|
---|
1382 | </DL>
|
---|
1383 | <HR>
|
---|
1384 |
|
---|
1385 | <A NAME="handleErrorFlush(java.lang.String)"><!-- --></A><H3>
|
---|
1386 | handleErrorFlush</H3>
|
---|
1387 | <PRE>
|
---|
1388 | public void <B>handleErrorFlush</B>(java.lang.String output)</PRE>
|
---|
1389 | <DL>
|
---|
1390 | <DD>Pass output sent to System.err to the TestRunner so it can
|
---|
1391 | collect it for the formatters.
|
---|
1392 | <P>
|
---|
1393 | <DD><DL>
|
---|
1394 | <DT><B>Overrides:</B><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></DL>
|
---|
1395 | </DD>
|
---|
1396 | <DD><DL>
|
---|
1397 | <DT><B>Parameters:</B><DD><CODE>output</CODE> - coming from System.err<DT><B>Since:</B></DT>
|
---|
1398 | <DD>Ant 1.5.2</DD>
|
---|
1399 | </DL>
|
---|
1400 | </DD>
|
---|
1401 | </DL>
|
---|
1402 | <HR>
|
---|
1403 |
|
---|
1404 | <A NAME="createWatchdog()"><!-- --></A><H3>
|
---|
1405 | createWatchdog</H3>
|
---|
1406 | <PRE>
|
---|
1407 | protected <A HREF="../../../../../../../org/apache/tools/ant/taskdefs/ExecuteWatchdog.html" title="class in org.apache.tools.ant.taskdefs">ExecuteWatchdog</A> <B>createWatchdog</B>()
|
---|
1408 | throws <A HREF="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
|
---|
1409 | <DL>
|
---|
1410 | <DD><DL>
|
---|
1411 |
|
---|
1412 | <DT><B>Returns:</B><DD><tt>null</tt> if there is a timeout value, otherwise the
|
---|
1413 | watchdog instance.
|
---|
1414 | <DT><B>Throws:</B>
|
---|
1415 | <DD><CODE><A HREF="../../../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - under unspecified circumstances<DT><B>Since:</B></DT>
|
---|
1416 | <DD>Ant 1.2</DD>
|
---|
1417 | </DL>
|
---|
1418 | </DD>
|
---|
1419 | </DL>
|
---|
1420 | <HR>
|
---|
1421 |
|
---|
1422 | <A NAME="getDefaultOutput()"><!-- --></A><H3>
|
---|
1423 | getDefaultOutput</H3>
|
---|
1424 | <PRE>
|
---|
1425 | protected java.io.OutputStream <B>getDefaultOutput</B>()</PRE>
|
---|
1426 | <DL>
|
---|
1427 | <DD>Get the default output for a formatter.
|
---|
1428 | <P>
|
---|
1429 | <DD><DL>
|
---|
1430 |
|
---|
1431 | <DT><B>Returns:</B><DD>default output stream for a formatter<DT><B>Since:</B></DT>
|
---|
1432 | <DD>Ant 1.3</DD>
|
---|
1433 | </DL>
|
---|
1434 | </DD>
|
---|
1435 | </DL>
|
---|
1436 | <HR>
|
---|
1437 |
|
---|
1438 | <A NAME="getIndividualTests()"><!-- --></A><H3>
|
---|
1439 | getIndividualTests</H3>
|
---|
1440 | <PRE>
|
---|
1441 | protected java.util.Enumeration <B>getIndividualTests</B>()</PRE>
|
---|
1442 | <DL>
|
---|
1443 | <DD>Merge all individual tests from the batchtest with all individual tests
|
---|
1444 | and return an enumeration over all <tt>JUnitTest</tt>.
|
---|
1445 | <P>
|
---|
1446 | <DD><DL>
|
---|
1447 |
|
---|
1448 | <DT><B>Returns:</B><DD>enumeration over individual tests<DT><B>Since:</B></DT>
|
---|
1449 | <DD>Ant 1.3</DD>
|
---|
1450 | </DL>
|
---|
1451 | </DD>
|
---|
1452 | </DL>
|
---|
1453 | <HR>
|
---|
1454 |
|
---|
1455 | <A NAME="allTests()"><!-- --></A><H3>
|
---|
1456 | allTests</H3>
|
---|
1457 | <PRE>
|
---|
1458 | protected java.util.Enumeration <B>allTests</B>()</PRE>
|
---|
1459 | <DL>
|
---|
1460 | <DD>return an enumeration listing each test, then each batchtest
|
---|
1461 | <P>
|
---|
1462 | <DD><DL>
|
---|
1463 |
|
---|
1464 | <DT><B>Returns:</B><DD>enumeration<DT><B>Since:</B></DT>
|
---|
1465 | <DD>Ant 1.3</DD>
|
---|
1466 | </DL>
|
---|
1467 | </DD>
|
---|
1468 | </DL>
|
---|
1469 | <HR>
|
---|
1470 |
|
---|
1471 | <A NAME="getOutput(org.apache.tools.ant.taskdefs.optional.junit.FormatterElement, org.apache.tools.ant.taskdefs.optional.junit.JUnitTest)"><!-- --></A><H3>
|
---|
1472 | getOutput</H3>
|
---|
1473 | <PRE>
|
---|
1474 | protected java.io.File <B>getOutput</B>(<A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">FormatterElement</A> fe,
|
---|
1475 | <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>
|
---|
1476 | <DL>
|
---|
1477 | <DD>If the formatter sends output to a file, return that file.
|
---|
1478 | null otherwise.
|
---|
1479 | <P>
|
---|
1480 | <DD><DL>
|
---|
1481 | <DT><B>Parameters:</B><DD><CODE>fe</CODE> - formatter element<DD><CODE>test</CODE> - one JUnit test
|
---|
1482 | <DT><B>Returns:</B><DD>file reference<DT><B>Since:</B></DT>
|
---|
1483 | <DD>Ant 1.3</DD>
|
---|
1484 | </DL>
|
---|
1485 | </DD>
|
---|
1486 | </DL>
|
---|
1487 | <HR>
|
---|
1488 |
|
---|
1489 | <A NAME="addClasspathEntry(java.lang.String)"><!-- --></A><H3>
|
---|
1490 | addClasspathEntry</H3>
|
---|
1491 | <PRE>
|
---|
1492 | protected void <B>addClasspathEntry</B>(java.lang.String resource)</PRE>
|
---|
1493 | <DL>
|
---|
1494 | <DD>Search for the given resource and add the directory or archive
|
---|
1495 | that contains it to the classpath.
|
---|
1496 |
|
---|
1497 | <p>Doesn't work for archives in JDK 1.1 as the URL returned by
|
---|
1498 | getResource doesn't contain the name of the archive.</p>
|
---|
1499 | <P>
|
---|
1500 | <DD><DL>
|
---|
1501 | <DT><B>Parameters:</B><DD><CODE>resource</CODE> - resource that one wants to lookup<DT><B>Since:</B></DT>
|
---|
1502 | <DD>Ant 1.4</DD>
|
---|
1503 | </DL>
|
---|
1504 | </DD>
|
---|
1505 | </DL>
|
---|
1506 | <HR>
|
---|
1507 |
|
---|
1508 | <A NAME="getCommandline()"><!-- --></A><H3>
|
---|
1509 | getCommandline</H3>
|
---|
1510 | <PRE>
|
---|
1511 | protected <A HREF="../../../../../../../org/apache/tools/ant/types/CommandlineJava.html" title="class in org.apache.tools.ant.types">CommandlineJava</A> <B>getCommandline</B>()</PRE>
|
---|
1512 | <DL>
|
---|
1513 | <DD><DL>
|
---|
1514 | <DT><B>Since:</B></DT>
|
---|
1515 | <DD>Ant 1.6.2</DD>
|
---|
1516 | </DL>
|
---|
1517 | </DD>
|
---|
1518 | </DL>
|
---|
1519 | <HR>
|
---|
1520 |
|
---|
1521 | <A NAME="executeOrQueue(java.util.Enumeration, boolean)"><!-- --></A><H3>
|
---|
1522 | executeOrQueue</H3>
|
---|
1523 | <PRE>
|
---|
1524 | protected java.util.Collection <B>executeOrQueue</B>(java.util.Enumeration testList,
|
---|
1525 | boolean runIndividual)</PRE>
|
---|
1526 | <DL>
|
---|
1527 | <DD>Executes all tests that don't need to be forked (or all tests
|
---|
1528 | if the runIndividual argument is true. Returns a collection of
|
---|
1529 | lists of tests that share the same VM configuration and haven't
|
---|
1530 | been executed yet.
|
---|
1531 | <P>
|
---|
1532 | <DD><DL>
|
---|
1533 | <DT><B>Since:</B></DT>
|
---|
1534 | <DD>1.6.2</DD>
|
---|
1535 | </DL>
|
---|
1536 | </DD>
|
---|
1537 | </DL>
|
---|
1538 | <HR>
|
---|
1539 |
|
---|
1540 | <A NAME="actOnTestResult(int, boolean, org.apache.tools.ant.taskdefs.optional.junit.JUnitTest, java.lang.String)"><!-- --></A><H3>
|
---|
1541 | actOnTestResult</H3>
|
---|
1542 | <PRE>
|
---|
1543 | protected void <B>actOnTestResult</B>(int exitValue,
|
---|
1544 | boolean wasKilled,
|
---|
1545 | <A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">JUnitTest</A> test,
|
---|
1546 | java.lang.String name)</PRE>
|
---|
1547 | <DL>
|
---|
1548 | <DD>Logs information about failed tests, potentially stops
|
---|
1549 | processing (by throwing a BuildException) if a failure/error
|
---|
1550 | occured or sets a property.
|
---|
1551 | <P>
|
---|
1552 | <DD><DL>
|
---|
1553 | <DT><B>Since:</B></DT>
|
---|
1554 | <DD>Ant 1.6.2</DD>
|
---|
1555 | </DL>
|
---|
1556 | </DD>
|
---|
1557 | </DL>
|
---|
1558 | <!-- ========= END OF CLASS DATA ========= -->
|
---|
1559 | <HR>
|
---|
1560 |
|
---|
1561 |
|
---|
1562 | <!-- ======= START OF BOTTOM NAVBAR ====== -->
|
---|
1563 | <A NAME="navbar_bottom"><!-- --></A>
|
---|
1564 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
---|
1565 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
---|
1566 | <TR>
|
---|
1567 | <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
---|
1568 | <A NAME="navbar_bottom_firstrow"><!-- --></A>
|
---|
1569 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
---|
1570 | <TR ALIGN="center" VALIGN="top">
|
---|
1571 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
---|
1572 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
1573 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
1574 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
1575 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
1576 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
1577 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
---|
1578 | </TR>
|
---|
1579 | </TABLE>
|
---|
1580 | </TD>
|
---|
1581 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
---|
1582 | </EM>
|
---|
1583 | </TD>
|
---|
1584 | </TR>
|
---|
1585 |
|
---|
1586 | <TR>
|
---|
1587 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
1588 | <A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.TypeAttribute.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><B>PREV CLASS</B></A>
|
---|
1589 | <A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.ForkMode.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><B>NEXT CLASS</B></A></FONT></TD>
|
---|
1590 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
1591 | <A HREF="../../../../../../../index.html" target="_top"><B>FRAMES</B></A>
|
---|
1592 | <A HREF="JUnitTask.html" target="_top"><B>NO FRAMES</B></A>
|
---|
1593 | <SCRIPT type="text/javascript">
|
---|
1594 | <!--
|
---|
1595 | if(window==top) {
|
---|
1596 | document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
---|
1597 | }
|
---|
1598 | //-->
|
---|
1599 | </SCRIPT>
|
---|
1600 | <NOSCRIPT>
|
---|
1601 | <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
---|
1602 | </NOSCRIPT>
|
---|
1603 |
|
---|
1604 | </FONT></TD>
|
---|
1605 | </TR>
|
---|
1606 | <TR>
|
---|
1607 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
1608 | SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#fields_inherited_from_class_org.apache.tools.ant.Task">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
1609 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
1610 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
---|
1611 | </TR>
|
---|
1612 | </TABLE>
|
---|
1613 | <A NAME="skip-navbar_bottom"></A>
|
---|
1614 | <!-- ======== END OF BOTTOM NAVBAR ======= -->
|
---|
1615 |
|
---|
1616 | <HR>
|
---|
1617 | Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
|
---|
1618 | </BODY>
|
---|
1619 | </HTML>
|
---|