1 2 Previous Next 22 Replies Latest reply on Jan 24, 2011 9:58 AM by ssilvert Go to original post
      • 15. Re: Does JSFUnit support testing of jsf pages with rich:editor control
        ssilvert

        Hi Ole,

         

        Thanks for doing some leg work on this.  It really helps a lot.  Unfortunately, I'm not getting the same results.  I tried hitting the RichFaces live demo with HtmlUnit and the span was rendered without a problem.

         

              WebClient webClient = new WebClient();
              HtmlPage page = webClient.getPage("http://livedemo.exadel.com/richfaces-demo/richfaces/editor.jsf");
              HtmlDivision div = (HtmlDivision)page.getElementById("form:editor");
              System.out.println(div.asXml());
        
        

         

         

        Stan

        • 16. Does JSFUnit support testing of jsf pages with rich:editor control
          kiransri

          Hi Stan,Ole;

           

          Thanks a lot and sorry for the delay in my response. I was on leave and am back now. I am getting the error with only a single rich:editor control on my page even after removing all the other controls. I will code and attach the page asap so that it might be helpful in reproducing the error at your end. And one more thing , I am using richfaces 3.3.1. Does the livedemo use the later version of richfaces which might not produce this error?

           

          Regards

          Kiran

          • 17. Does JSFUnit support testing of jsf pages with rich:editor control
            ssilvert

            Hi Kiran,

             

            The live demo is using 3.3.3.  Can you give it a try with that version?

             

            Stan

            • 18. Does JSFUnit support testing of jsf pages with rich:editor control
              kiransri

              Hi Stan,

              I will upgrade my application to 3.3.3 and let you know the results.

              Hopefully it will resolve the issue.

               

              Regards

              Kiran

              • 19. Re: Does JSFUnit support testing of jsf pages with rich:editor control
                kiransri

                Hi Stan,


                I upgraded my applcation to RichFaces 3.3.3 but I am getting a different error now. I am not able to get a reference to a HTMLSelect on my page. The test is hence failing with a null pointer exception. This was not occuring in RF 3.3.1.

                I am using JSFUnit 1.1.1. Is there a compatibility issue with RF 3.3.3? I could not upgrade to JSUnit 1.3.0 as my web application is version 2.5.

                I have attached my pages cardrequesttest.xhtml(the page i am testing), layout.xhtml (the template file),the JSFUnit test class and the logs. Please help in resolving this error.

                Regards
                Kiran

                • 20. Re: Does JSFUnit support testing of jsf pages with rich:editor control
                  ssilvert

                  Give JSFUnit 1.3.0 a try and let me know.  There is no problem using JSFUnit 1.3.0 with Servlet 2.5. 

                   

                  If you have Servlet 3.0 you will have a couple of extra features like the JSFUnit console and automatic inclusions of JSFUnit delcarations in web.xml.  But everything else works the same as earlier JSFUnit versions.

                   

                  Stan

                  • 21. Re: Does JSFUnit support testing of jsf pages with rich:editor control
                    kiransri

                    Hi Stan,

                     

                    When I try JSFUnit 1.3 it is not even establishing the JSFSession. I am getting the below error

                     

                    org.jboss.jsfunit.framework.JSFUnitWebConnection.getResponse(Lcom/gargoylesoftware/htmlunit/WebRequestSettings;)Lcom/gargoylesoftware/htmlunit/WebResponse;

                     

                    java.lang.AbstractMethodError: org.jboss.jsfunit.framework.JSFUnitWebConnection.getResponse(Lcom/gargoylesoftware/htmlunit/WebRequestSettings;)Lcom/gargoylesoftware/htmlunit/WebResponse;
                    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1430)
                    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1388)
                    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:325)
                    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:386)
                    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:371)
                    at org.jboss.jsfunit.framework.SimpleInitialRequestStrategy.doInitialRequest(SimpleInitialRequestStrategy.java:48)
                    at org.jboss.jsfunit.framework.WebClientSpec.doInitialRequest(WebClientSpec.java:259)
                    at org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:81)
                    at org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:58)
                    at edu.nyu.ecoms.oaa.vs.test.web.VisitingScholarNewRequestTest.setUp(VisitingScholarNewRequestTest.java:48)
                    at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
                    at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
                    at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
                    at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
                    at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
                    at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
                    at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
                    at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
                    at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
                    at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
                    at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
                    at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
                    at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
                    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
                    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
                    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                    at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
                    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
                    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
                    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
                    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
                    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
                    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
                    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
                    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
                    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

                    • 22. Re: Does JSFUnit support testing of jsf pages with rich:editor control
                      ssilvert

                      Kiran Srinivasa wrote:

                       

                      Hi Stan,

                       

                      When I try JSFUnit 1.3 it is not even establishing the JSFSession. I am getting the below error

                       

                      org.jboss.jsfunit.framework.JSFUnitWebConnection.getResponse(Lcom/gargoylesoftware/htmlunit/WebRequestSettings;)Lcom/gargoylesoftware/htmlunit/WebResponse;

                       

                      java.lang.AbstractMethodError: org.jboss.jsfunit.framework.JSFUnitWebConnection.getResponse(Lcom/gargoylesoftware/htmlunit/WebRequestSettings;)Lcom/gargoylesoftware/htmlunit/WebResponse;
                      at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1430)
                      at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1388)
                      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:325)
                      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:386)

                       

                       

                      I think maybe when you upgraded to JSFUnit 1.3 you didn't upgrade HtmlUnit?  Check out the Getting Started page for the correct versions of all the dependencies.

                       

                      Stan

                      1 2 Previous Next