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.




Professional Java Tools for Extreme Programming
Professional Java Tools for Extreme Programming: Ant, XDoclet, JUnit, Cactus, and Maven (Programmer to Programmer)
ISBN: 0764556177
EAN: 2147483647
Year: 2003
Pages: 228

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net