File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes TagUnit : an open source framework for testing JSP custom tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "TagUnit : an open source framework for testing JSP custom tags" Watch "TagUnit : an open source framework for testing JSP custom tags" New topic

TagUnit : an open source framework for testing JSP custom tags

Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
As you may have seen, I started a topic a few weeks back about how people test custom tags. Since then, a few of us have been throwing some ideas around, done some prototyping, the result of which is the TagUnit project.
Here's some brief information about the project - apologies for posting this into the JSP forum if it's not really appropriate.
TagUnit is an open source framework whereby JSP custom tags can be tested inside the container, and in isolation to the application specific pages on which they will ultimately be used. In essence, it's a tag library for testing tags within JSP pages. This means that it is easy to unit test tags, including the content that they generate and the side-effects that they have on the environment such as the introduction of scripting variables, page context attributes, cookies and so on.
In addition to "unit testing" tags, it is also useful to be able to test the cooperation between tags in a tag library, to ensure that the correct results are produced when tags are used in conjunction with one another. This is more like integration or component testing than unit testing, but is still important and possible within the same framework.
Finally, assertions can be made on the constraints specified within the tag library descriptor file, allowing tests to be made on the contract that a tag provides.

For further information, documentation and downloads, please see the project website - Although still in the prototyping phase, binary and source code distributions are available to download. Feel free to have a play and sign up on the mailing lists if you're interested in learning more or have some feedback.
p.s. hope you're not reading this in Blatant Advertising!
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

its open source... and you're asking for input / usage and what not... so I think you escape the drones of Blatant Advertising.
It is sorta covered in the JavaRanch Style Guide.
subject: TagUnit : an open source framework for testing JSP custom tags
jQuery in Action, 3rd edition