0 Replies Latest reply on Oct 22, 2008 12:34 PM by rashmitambe

    Unit testing portlet

    rashmitambe Newbie

      Hello All

      Has anybody used portletunit for unit testing portlets? There is very less help available and there is no community as well. I am trying to use it for testing Portlets in Jboss portal platform and getting erros as -

      
       java.lang.RuntimeException: Unable to autoload servlet: javax.faces.webapp.FacesServlet: java.lang.NullPointerException
       at com.meterware.servletunit.WebApplication$WebResourceMap.autoLoadServlets(WebApplication.java:997)
       at com.meterware.servletunit.WebApplication.<init>(WebApplication.java:132)
       at com.meterware.servletunit.ServletRunner.<init>(ServletRunner.java:109)
       at net.sf.portletunit.PortletRunner.createPortletRunner(PortletRunner.java:128)
       at net.sf.portletunit.PortletRunner.createPortletRunner(PortletRunner.java:104)
       at com.groundworkopensource.portal.dashboard.test.TestTreePortlet.testHelloWorld(TestTreePortlet.java:47)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at junit.framework.TestCase.runTest(TestCase.java:154)
       at junit.framework.TestCase.runBare(TestCase.java:127)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:118)
       at junit.framework.TestSuite.runTest(TestSuite.java:208)
       at junit.framework.TestSuite.run(TestSuite.java:203)
       at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
       at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      
      
      


      If anybody can help with portletunit or has used any other framework to test portlets, please reply.