2 Replies Latest reply on Mar 19, 2010 3:42 AM by jobb

    Exception running JSFUnitTest with RichFacesClient

    jobb
      Problem running JSFUnitTest with RichFacesClient

      Using : JSFUnit 1.2 JSF.20 RF 3.3.3CR1

       

      Sets up easily test :

       

          JSFSession jsfSession = new JSFSession("pageToTest");
          JSFClientSession client = jsfSession.getJSFClientSession();
          org.jboss.jsfunit.richclient.RichFacesClient rfClient = new RichFacesClient(client);
          rfClient.clickTab("bodyForm:tab3");

       

      The entire test is performed correctly, but after the test is completed comes the one exception :
      Cannot read property "_listeners" from undefined (http://localhost/MineJsfunit/a4j/g/3_3_3.CR1/org/richfaces/ui.pack.js.xhtml#2800)

       

         
      The whole exception is enclosed.
      What can this result?

       

      Regards
      Mirek

        • 1. Re: Exception running JSFUnitTest with RichFacesClient
          ssilvert

          You should be able to safely ignore these errors.  They are being thrown during cleanup when your JSFSession is unbound from the HttpSession.

           

          Besides a messy log, the only problem this might cause is a memory issue in extreme cases.  However, I have opened a jira issue so we can at least handle this case a little more robustly in the future.

           

          https://jira.jboss.org/jira/browse/JSFUNIT-249

           

           

          Stan

          • 2. Re: Exception running JSFUnitTest with RichFacesClient
            jobb

            Thanks for your reply.
            I can ignore the errors but have difficulty catching up com.gargoylesoftware.htmlunit.ScriptException.
            Even though I placed the catch on this in tearDown (). How to suppress this errors?

             

            Another thing.
            When I run the tests come up some error that applies for RichFaces java script and CSS files :

             

            JS errors : StrictErrorReporter.runtimeError concerning framework.pack.js.xhtml and ui.pack.js.xhtml
            CSS errors : DefaultCssErrorHandler.error and NumberFormatException: For input string: "0\9"

             

            Did you get the same log ?