3 Replies Latest reply on Mar 6, 2009 7:40 AM by ssilvert

    JBAS-6200 - integration tests with JBoss AS 5.1.0

    shelly.mcgowan

      I've started creating a test target as part of the JBoss AS 5 testsuite to ensure when the embedded admin console is deployed, the server successfully starts and the console is accessible. It is anticipated that additional tests from the embjopr-jsfunit project will be included. Using ant tasks, I've created a test configuration, called admin-console-default, which includes the jboss-jsfunit.deployer and the jbas5-admin-console.war. Testing the target, the test errors with:

      Testcase: testDeployWAR took 0.75 sec
       Caused an ERROR
      Failed to get the test results at [http://localhost:8080/admin-console/ServletRedirector]
      org.apache.cactus.util.ChainedRuntimeException: Failed to get the test results at [http://localhost:8080/admin-console/ServletRedirector]
       at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:92)
       at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:288)
       at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
       at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
       at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
       at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:288)
       at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
       at org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
       at org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
       at org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
      
      
      Caused by: java.lang.NoClassDefFoundError: org/jboss/seam/contexts/Contexts
       at org.jboss.jsfunit.seam.ConversationScope.cache(ConversationScope.java:71)
       at org.jboss.jsfunit.seam.JSFUnitLifecycle.execute(JSFUnitLifecycle.java:76)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      


      And, as seen, setting the cactus.contextURL to:
      jvmarg value="-Dcactus.contextURL=${node0.http.url}/admin-console"


      I'd like to discuss this approach and the additional configuration steps to avoid the error shown above.