blob: b270397b273294b4a9a82c1385082f959ac474a0 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../dtd/document-v10.dtd">
<document>
<header>
<title>Testing your Apache Cocoon</title>
<version>1.1</version>
<type>Technical document</type>
<authors>
<person name="Bernhard Huber" email="huber@apache.org"/>
<person name="Stephan Michels" email="stephan@apache.org"/>
<person name="David Crossley" email="crossley@apache.org"/>
</authors>
</header>
<body>
<s1 title="Overview of testing procedures">
<p>
There are some initial procedures available for you to ensure that
Apache Cocoon can run properly on your particular computing platform
and that the components do function properly.
</p>
<p>
You can build upon this infrastructure to add your own tests, and to
ensure that development work proceeds smoothly. The tests are located
in the <code>src/test/</code> directory.
</p>
</s1>
<s1 title="JUnit tests">
<p>
Run &quot;<code>build test</code>&quot; to conduct an initial set of
automated JUnit test cases,
e.g. Test various transformers;
Test the methods for getting platform-dependent filesystem pathnames; etc.
</p>
<s2 title="How to add more tests">
<p>
As there is already a nice junit framework available, it is not that
difficult to add junit tests for any transformer. In short:
</p>
<ul>
<li>Create XYTransformerTestCase.java</li>
<li>Create XYTransformerTestCase.xconf</li>
<li>Edit the transformers section in XYTransformerTestCase.xtest
for XYTransformerTestCase</li>
<li>Add testABC() methods to XYTransformerTestCase.java</li>
</ul>
</s2>
</s1>
<s1 title="Other tests">
<ul>
<li>
Some Anteater Functional Tests at <code>src/test/anteater</code>
</li>
<li>
<link href="../catalog-test.html">Testing: Catalog Entity Resolver</link>
which conducts some additional tests for resolving external entities.
</li>
</ul>
</s1>
</body>
</document>