Hi,

I'm no cactus guru, but using it seems a bit far fetched to "just" test taglibs, IMHO.
I would suggest using httpunit (the servletunit part of it), which has embedded jasper support. I've succesfully used it last weekend to develop (test-first) a small taglib of mine.
If you decide to go for that, I could give you some sample code to get you started ;)


g

Fabrizio Giustina wrote:

I recently realized that our few cactus tests for displaytag simply didn't test anything...
There were a couple of "small" errors which prevented the tests to work:
- tag lifecycle assertions work only if called before the tagLifeCycle.invoke() method call (assertion after invoke(), like the ones in our tests, are never evaluated)
- the endXXX method names in our source were wrong: the end method for testAsXml has to be called endAsXml, not endTestAsXml as previously was in our code.
I've now fixed existing tests and added a couple more, but I'm getting crazy in making tests working...
anybody can help in understanding what is wrong there???
Actually the MediaTest test case doesn't work for 2 reasons:
- tag body seems always to be evaluated only once, so
this.columnOneLifecycle.expectBodyEvaluated(2);
fails. This happens also if the table source is a list with 2 values. In debugging the WebResponse text you strangely get a table with _2_ rows, but the second one is always empty.
- in MediaTest.testAsHtml() you have a different behaviour than the one you get in a jsp page. That is, a column with "xml" media always gets evaluated also for an html output. Note that testAsXml(), instead, works properly.
Any cactus guru out there?
fabrizio



------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ displaytag-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to