Author: bodewig
Date: Mon Sep 18 21:31:21 2006
New Revision: 447724
URL: http://svn.apache.org/viewvc?view=rev&rev=447724
Log:
update docs
Added:
ant/antlibs/antunit/trunk/README (with props)
Modified:
ant/antlibs/antunit/trunk/docs/antunit.html
ant/antlibs/antunit/trunk/docs/assert.html
ant/antlibs/antunit/trunk/docs/assertions.html
ant/antlibs/antunit/trunk/docs/index.html
ant/antlibs/antunit/trunk/docs/plainlistener.html
ant/antlibs/antunit/trunk/docs/xmllistener.html
Added: ant/antlibs/antunit/trunk/README
URL:
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/README?view=auto&rev=447724
==============================================================================
--- ant/antlibs/antunit/trunk/README (added)
+++ ant/antlibs/antunit/trunk/README Mon Sep 18 21:31:21 2006
@@ -0,0 +1,32 @@
+What's this?
+============
+
+This library contains tasks that enables Ant task developers to test
+their tasks with Ant and without JUnit. It contains a few assertion
+tasks and an antunit task that runs build files instead of test
+classes and is modelled after the JUnit task.
+
+Learn more
+==========
+
+The documentation is included in the docs subdirectory of this
+distribution. The home of this library is
+<http://ant.apache.org/antlibs/antunit/index.html>.
+
+Building
+========
+
+This Ant Library requires Ant 1.7.0beta2 or later to build, some of
+the test use JUnit 3 (3.8.2 recommended).
+
+It should work with any Java(TM) Runtime (and compile with any Java(TM)
+Developer Kit) starting with version 1.2.
+
+Using
+=====
+
+You use this Ant library like any other Ant library 8-)
+
+In short you can make it available to Ant in a variety of ways, please
+see the Ant manual or the index.html file in the docs subdirectory of
+this distribtion for details.
Propchange: ant/antlibs/antunit/trunk/README
------------------------------------------------------------------------------
svn:eol-style = native
Modified: ant/antlibs/antunit/trunk/docs/antunit.html
URL:
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/docs/antunit.html?view=diff&rev=447724&r1=447723&r2=447724
==============================================================================
--- ant/antlibs/antunit/trunk/docs/antunit.html (original)
+++ ant/antlibs/antunit/trunk/docs/antunit.html Mon Sep 18 21:31:21 2006
@@ -39,11 +39,12 @@
<p>Tests are specified via ResourceCollections.</p>
<p>All targets whose name starts with "test" (but not if the name
- is "test" exactly) are considered test
- cases. If a test build file contains a target named setUp, this
- gets executed before each test target. If it contains a target
- named tearDown this gets executed after each test target. Each
- test target is run in a fresh Ant project.</p>
+ is "test" exactly) are considered test cases. If a test build
+ file contains a target named setUp, this gets executed before each
+ test target. If it contains a target named tearDown this gets
+ executed after each test target. Each test target is run in a
+ fresh Ant project, i.e. each test target has a fresh set of
+ properties and references.</p>
<p>So in a build file with targets setUp, tearDown, test1 and
test2, antunit will run two Ant builds. One will run the targets
@@ -190,6 +191,14 @@
<fail message="test5 exits with error"/>
</target>
+ <target name="testLogCaptureActive">
+ <au:assertReferenceSet refid="ant.antunit.log"/>
+ </target>
+
+ <target name="test">
+ <fail>should be ignored</fail>
+ </target>
+
<target name="tearDown">
<echo>tearDown</echo>
</target>
@@ -208,15 +217,18 @@
<pre>
[au:antunit] Build File: .../src/etc/testcases/antunit/base.xml
-[au:antunit] Tests run: 4, Failures: 1, Errors: 1, Time elapsed: 0,187 sec
-[au:antunit] Target: test5 took 0,016 sec
-[au:antunit] Caused an ERROR
-[au:antunit] test5 exits with error
-[au:antunit] Target: test4 took 0,129 sec
-[au:antunit] FAILED
-[au:antunit] test4 fails
-[au:antunit] Target: test2 took 0 sec
-[au:antunit] Target: test1 took 0 sec
+[au:antunit] Tests run: 5, Failures: 1, Errors: 1, Time elapsed: 0.216 sec
+[au:antunit] Target: test2 took 0.001 sec
+[au:antunit] Target: test1 took 0.001 sec
+[au:antunit] Target: testLogCaptureActive took 0.128 sec
+[au:antunit] Target: test5 caused an ERROR
+[au:antunit] at line 56, column 45
+[au:antunit] Message: test5 exits with error
+[au:antunit] took 0.01 sec
+[au:antunit] Target: test4 FAILED
+[au:antunit] at line 50, column 42
+[au:antunit] Message: test4 fails
+[au:antunit] took 0.003 sec
</pre>
</body>
</html>
Modified: ant/antlibs/antunit/trunk/docs/assert.html
URL:
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/docs/assert.html?view=diff&rev=447724&r1=447723&r2=447724
==============================================================================
--- ant/antlibs/antunit/trunk/docs/assert.html (original)
+++ ant/antlibs/antunit/trunk/docs/assert.html Mon Sep 18 21:31:21 2006
@@ -55,7 +55,7 @@
<h3>Examples</h3>
<p>Make the build fail with the message "foo is bar" if the
- property foo has the value bar:</p>
+ property <code>foo</code> has the value bar:</p>
<pre>
<assertTrue message="foo is bar">
Modified: ant/antlibs/antunit/trunk/docs/assertions.html
URL:
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/docs/assertions.html?view=diff&rev=447724&r1=447723&r2=447724
==============================================================================
--- ant/antlibs/antunit/trunk/docs/assertions.html (original)
+++ ant/antlibs/antunit/trunk/docs/assertions.html Mon Sep 18 21:31:21 2006
@@ -88,7 +88,7 @@
property foo doesn't hold the value bar regardless of case:</p>
<pre>
- <assertEquals message="foo is bar" expected="bar"
+ <assertEquals message="foo is not bar" expected="bar"
actual="${foo}" casesensitive="false"/>
</pre>
Modified: ant/antlibs/antunit/trunk/docs/index.html
URL:
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/docs/index.html?view=diff&rev=447724&r1=447723&r2=447724
==============================================================================
--- ant/antlibs/antunit/trunk/docs/index.html (original)
+++ ant/antlibs/antunit/trunk/docs/index.html Mon Sep 18 21:31:21 2006
@@ -29,13 +29,13 @@
<h2>Requirements</h2>
- <p>The current version requires Ant 1.7.x (read CVS HEAD).</p>
+ <p>The current version requires Ant 1.7.0 Beta 2 or later.</p>
<h2>Where is it?</h2>
- <p>The source code for the library currently lives in the
- developer sandbox in Ant's SVN - <a
-
href="http://svn.apache.org/viewcvs.cgi/ant/sandbox/antlibs/antunit/trunk/">http://svn.apache.org/viewcvs.cgi/ant/sandbox/antlibs/antunit/trunk/</a>.</p>
+ <p>The source code for the library lives in the
+ antlibs subspace of Ant's SVN - <a
+
href="http://svn.apache.org/viewcvs.cgi/ant/antlibs/antunit/trunk/">http://svn.apache.org/viewcvs.cgi/ant/antlibs/antunit/trunk/</a>.</p>
<h2>Installation</h2>
Modified: ant/antlibs/antunit/trunk/docs/plainlistener.html
URL:
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/docs/plainlistener.html?view=diff&rev=447724&r1=447723&r2=447724
==============================================================================
--- ant/antlibs/antunit/trunk/docs/plainlistener.html (original)
+++ ant/antlibs/antunit/trunk/docs/plainlistener.html Mon Sep 18 21:31:21 2006
@@ -47,11 +47,11 @@
<tr>
<td valign="top">toDir</td>
<td valign="top">Directory where testreports will be written
- to. Default's to the project's basedir.</td>
+ to if writing to a file. Defaults to the project's
+ basedir.</td>
<td align="center">No.</td>
</tr>
</table>
-
</body>
</html>
Modified: ant/antlibs/antunit/trunk/docs/xmllistener.html
URL:
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/docs/xmllistener.html?view=diff&rev=447724&r1=447723&r2=447724
==============================================================================
--- ant/antlibs/antunit/trunk/docs/xmllistener.html (original)
+++ ant/antlibs/antunit/trunk/docs/xmllistener.html Mon Sep 18 21:31:21 2006
@@ -32,6 +32,12 @@
information that appears as attributes for the JUnit formatter has
been turned into elements to allow streaming of the report.</p>
+ <p>The AntUnit distribution comes with two XSLT stylesheets (in
+ the etc subdirectory of the binary or the src/etc directory of the
+ source release) that can be used together with Ant's
+ <junitreport> task to create reports about your AntUnit
+ tests.</p>
+
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
@@ -42,11 +48,33 @@
<tr>
<td valign="top">toDir</td>
<td valign="top">Directory where testreports will be written
- to. Default's to the project's basedir.</td>
+ to. Defaults to the project's basedir.</td>
<td align="center">No.</td>
</tr>
</table>
+ <h3>Examples</h3>
+
+<pre>
+ <au:antunit failonerror="false" errorproperty="antunit-failure">
+ <fileset dir="${tests}" includes="*.xml"/>
+ <au:xmllistener toDir="${reportsdir}"/>
+ </au:antunit>
+ <junitreport>
+ <fileset dir="${reportsdir}" includes="*.xml"/>
+ <report format="frames" styledir="${antunit-styles}"
+ todir="${reportsdir}-frames"/>
+ </junitreport>
+ <fail if="antunit-failure">At least one test has failed</fail>
+</pre>
+
+ <p>Runs AntUnit on all XML files in the directory
+ <code>${test}</code> writing XML reports to the directory
+ <code>${reportsdir}</code> (which must exist upfront). Based on
+ the XML reports a consolidated HTML frame report is created in
+ <code>${reportsdir}-frames</code> using the stylesheets mentioned
+ above. <code>${antunit-styles}</code> must point to the directory
+ containing the stylesheets.</p>
</body>
</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]