Testing your Apache Cocoon (2.1 legacy document)
Warning
This document was copied as is from the Cocoon 2.1 documentation, but has not
yet been fully reviewed or moved to its new home.
Overview of testing procedures
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.
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 src/test/ directory.
JUnit tests
Run "build test" 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.
How to add more tests
As there is already a nice junit framework available, it is not that difficult to add junit tests for any transformer. In short:
- Create XYTransformerTestCase.java
- Create XYTransformerTestCase.xconf
- Edit the transformers section in XYTransformerTestCase.xtest for XYTransformerTestCase
- Add testABC() methods to XYTransformerTestCase.java
Other tests
- Some Anteater Functional Tests at src/test/anteater
- Testing: Catalog Entity Resolver which conducts some additional tests for resolving external entities.