We are moving to a testing based development approach. We are looking towards PortletUnit as our unit testing aid for testing the Portlets.
- I have included all the Portlet Unit jars into the project
- Created a test case and added a testing method to test the doView functionality.
While I have followed the steps in the documentation I got an exception at the following point.
File webInfDir=new File("C:/Test_168_Portlet/WebContent");
Class portletClass = Test_168_Portlet.class;
PortletRunner runner = null;
runner = PortletRunner.createPortletRunner(portletClass,webInfDir, "Test_168_Portlet");
The exception states:
javax.servlet.UnavailableException: Initialization of one or more services failed.