views:

10

answers:

0

I am trying to configure JSFUnit to run in my application. We are an ICEFaces app deployed on WAS 6.1.

When I create my TestCase and access it from the following URL:

localhost:9085/smagui/ServletTestRunner?suite=com.sma.gui.product.JSFUnitTest&xsl=cactus-report.xsl

I get a report that says:

testInitialPage Error Failed to get the test results at [http://localhost:9085/smagui/ServletRedirector] 

The logs for cactus are saying:

org.apache.cactus.internal.client.ParsingException: Not a valid response [401 Unauthorized]

Granted, authentication is needed to log into my app, but I am trying to configure it the way JSFUnit's documentation recommends. As in:

   public void testInitialPage() throws IOException {

          // Send an HTTP request for the initial page
       WebClientSpec wcSpec = new WebClientSpec("/pages/product/initial.iface");
       wcSpec.setInitialRequestStrategy(new BasicAuthenticationStrategy("user", "pwd"));
       JSFSession jsfSession = new JSFSession(wcSpec);
       JSFClientSession client = jsfSession.getJSFClientSession();
       JSFServerSession server = jsfSession.getJSFServerSession();  

   }

The problem is, this testInitialPage method is never called and I just get the 'Failed to get test results' error message.

Any idea?