Hi John, I think you're the first one to ask how to use Cactus to unit test Portlets!
It should be relatively easy (but a big and long task) to implement support for Portlets inside Cactus and I'm all for integrating it into the project should you or someone provide a patch for it. Actually if someone is really keen to work on this and support it on the long term, I'd even prefer to make that person a committer on the project (after he's proved himself of course ;-)) as that person will be the best placed to fix bugs, improve the code, etc. As a quickstart, here are the Java classes that would need to be implemented in the Cactus framework subproject: * Create a PortletTestCase class (similar to the ServletTestCase one) * Create a PortletConfiguration interface + DefaultPortletConfiguration implementation class (again similar to the Servlet one) * Create PortletImplicitObjects, PortletTestCaller and PortletTestController classes * Create wrappers around Portlet implicit objects *if* need be only That's the easy part but would be enough for users to start benefiting from it. They would need to manunally start their portlet container and manually deploy their Cactus tests into it though. The next step is to add support for Portlets inside the Cactus integrations subprojects, namely: the Ant integration subproject, the Maven integration subproject, create a Portlet Test Runner (similar to the Servlet Test Runner), etc. But again, this can be implemented bit by bit over time. If you're interested in implementing this for Cactus, you would also need to follow the Cactus development guidelines (http://jakarta.apache.org/cactus/participating/coding_conventions.html, http://jakarta.apache.org/cactus/participating/apis.html). The only request I'm asking is that if you wish to start this initiative, that you do it seriously and consistently over time. There's nothing as detrimental for an open source project as someone who start working on something and then stops midway (It happened to us with the Eclipse plugin for Cactus - The guy started and then left the project with something halfway working). Let me know what you think and fire any specific questions you have! Thanks -Vincent > -----Original Message----- > From: John Rousseau [mailto:[EMAIL PROTECTED] > Sent: vendredi 6 ao�t 2004 23:27 > To: [EMAIL PROTECTED] > Subject: Portlet support > > Hi, > > I'm new to cactus, but not to the concept. I wrote my own testbed (cactus- > lite?) to exercise our servlet and JSP container using HttpUnit and some > other tools early last year. > > I'm currently working on our portlet container and I'd like to use cactus > to exercise the implementation instead of rolling my own. We also have > portlet writers here that would make use of this. Can somebody give me a > quick laundry list of what I would need to implement / change to support > testing portlets? Some of the classes needed are obvious, but any pointers > to get me going would be very much appreciated. > > I've searched the dev archives and didn't find any references to portlet. > Has anyone done any work to support testing portlets with cactus before? > > I'd, of course, be willing to contribute the changes back once I'm done. > > Thanks > -John > > -- > ---------------------------------------------------------------- > John Rousseau [EMAIL PROTECTED] > Novell, Inc. Phone: +1 781 464 8377 > 404 Wyman Street Fax: +1 781 464 8100 > Waltham, MA 02451 http://www.novell.com > ---------------------------------------------------------------- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
