JaVa
   

Summary

JSP custom tags pose a few challenges to test developers with their complexity. For testing the logic of the tag handler class, we used Cactus's JspTestCase. JspTestCase provides access to JSP implicit objects (pageContext and out) as member variables in addition to the implicit objects of ServletTestCase. In order to thoroughly test a custom tag, we must also test the tag's library descriptor and/or its TagExtraInfo class. For this we used a JSP-based testing method. Although not entirely bulletproof, this method has the benefit of serving as executable documentation for our code.


JaVa
   
Comments