Re: [Portletunit-users] PortletUnit
Status: Alpha
Brought to you by:
m0smith
|
From: m0smith <m0...@gm...> - 2007-04-26 15:41:09
|
Using PorltetRunner =============== PortletRunner allows you to test your portlets much the same way ServletUnit allows you to test servlets. The process is: 1 - Get a PortletRunner object 2 - call runner.getResponse() Getting the PorltetRunner object: PortletRunner runner = PortletRunner.createPortletRunner( portletClass, dir, name); portletClass - The class of the portlet. This class must implement Portlet or extend GenericPortlet dir - The directory that contains the WEB-INF dir. In Eclipse it might be WebRoot name - The name of the portlet in the portlet.xml Calling runner.getResponse When you call runner.getResponse, you will get a WebResponse object. This object has methods to check the html, click buttons and submit forms. -- I am, truly and sincerely, your friend and well-wisher, m0smith http://www.ferociousflirting.com |