----- Original Message -----
From: "Robert Girardin" <[EMAIL PROTECTED]>
To: "'Cactus-User (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, August 09, 2001 9:23 PM
Subject: Testing Tag Libraries


> Does anyone know what steps would be necessary to test tag libraries? The
cactus website shows the scope diagram as supporting Taglib testing under
the controller, but I have been unable to find anything on the topic.

There are no documentation and no examples yet as it is a new topic.However
you should be able to find information by searching either this mailing-list
archive or the [EMAIL PROTECTED] one (which was the
previous list hosting Cactus discussions). To search the archives, go to
www.mail-archive.com

To answer in short : At the current time we still don't know for sure how to
unit test tag lib which uses the bodyContent object. However it works well
for tags that do not use it. You can check the tests written for struts as
there are Cactus unit tests for some Struts tag libs.

The principle is very simple. You write a test case that extends JspTestCase
(instead of ServletTestCase). This will let you have access to the
pageContext implicit object. This is all you should to unit test your tag
lib (apart from the bodyContent).

Tell me if this help and we are looking for help in this area. We need
pioneers that will help to find ways to unit test all kind of tag libs ...

>
> Thanks,
> Rob Girardin

Thanks
-Vincent

Reply via email to