4 Replies Latest reply on Nov 23, 2010 2:04 AM by speleomaniac

    JBoss Portal and JSFUnit

    speleomaniac

      Hi everybody,

       

      is it possible to use JSFUnit with JBoss Portal?

       

      If not what is the cause of the problem, can somebody give me some tips....

       

      Thx for the answers...

        • 1. Re: JBoss Portal and JSFUnit
          ssilvert

          JSFUnit does not support portlet testing, if that's what you are trying to do.  It would require a lot of work to add this and there hasn't been that much demand for it.  A couple of times I've had people who said they were willing to work on it but they never followed through.

           

          Stan

          • 2. Re: JBoss Portal and JSFUnit
            speleomaniac

            Well, now I can test my JSF application behind the portal

             

            Naturally, I can only test it as Ajax application...

             

            I make manually a request to the Portal to initialize the portlet bridge, then in the test that I wrote I send the requests directly to the web application (like Richfaces doing for their Ajax functionality) and it works....

             

            I think to test it completely against the portal, we have to look to the out several portlets in the GUI which should handle the request and somehow redirect JSFUnit requests directly to that application....

             

            Or what other hurdles exist there that I can't imagine....

            • 3. Re: JBoss Portal and JSFUnit
              ssilvert

              It's been a long time since I looked at it, but if you want to try to see if you want to tackle portlet support for JSFUnit then you should probably start with the JSFUnitFacesContext.  You'll need a portlet version of that.  I can't remember what else would be involved.

               

              Stan

              • 4. Re: JBoss Portal and JSFUnit
                speleomaniac

                Actually I didn't have to change the JSFUnitFacesContext because it is already using delegates and it is delegating everything jboss portletbridge FacesContext but I had to change the JSFUnitFacesContextFactory because isJSFUnitRequest() was not functioning....

                I am placing the class as attachment if somebody else needs it....