Giacomo Pati wrote:



Upayavira wrote:

Steve K wrote:

Upayavira --
- Jakarta Cactus (http://jakarta.apache.org/cactus/) -- This takes a similar approach by setting up a mock servlet environment to test your servlets in. However, it seemed way to big and complicated to do what I thought would be very simple. Also, I think there is a lot to be gained by unit testing at the pipeline level as you suggest, rather than treating Cocoon like just another servlet.



I skimmed it too, but it didn't seem to fit.


Have you guys also looked at Anteater http://aft.sf.net?

My personal experience with HTTPUnit is that is somehow inflexible and way too programmatic, not very declarative as Anteater is.

Interesting.


I had thought about a more declarative approach, and there are already some Anteater tests in the Cocoon codebase.

Looking at it, I suspect we could get away with extending/modifying the HTTPRequest and replacing the HTTPClient with a CocoonClient. I can see how it could be done. Worst case, I would just replace HTTPRequest with CocoonRequest and HTTPClient with CocoonClient.

I haven't yet worked out how to allow xpaths on intermediate pipeline XMLs - I haven't found the docs on Anteater that easy to understand. The best thing I found were the anteater tests within Cocoon (src/test/anteater).

So it is certainly possible, and I'll look into it more.

Regards, Upayavira




Reply via email to