JBossWS - Running the test suites

    Please refer to JBossWS - Source code - JBoss Community for obtaining the source.

     

    Typically you would build, deploy, test one of the web service stacks against one of the supported target containers. Here we explain first the manual procedure. Further down you find instruction on how to do this using our automated Hudson QA environment.

    Please not two different builds are available, Ant and Maven+Ant, as the binary distribution does not use Maven.

    Working with the integration layers

    To run the general JAX-WS samples against our native WS stack on JBoss-6.0 you would run the sequence below. This is also the required sequence before any SVN commit. If one of the tests fails, please complain loudly.

    Ant build

    Note

    Make sure to modify ant.properties accordingly before running the tasks below. Running the tests against another target container simply means changing the ant.properties calling "ant deploy-jboss510" for instance. Also please note that the provided Ant targets may change from release to release because of different supported AS containers; calling "ant -projecthelp" is often a good idea to understand which targets are available.

      
    cd stack/native/trunk/target/jbossws-bin-dist
    ant deploy-jboss600
    ant tests-main
    ant tests-samples

    To run the collection of provider sample tests, you would run

    ant -Dtest=jaxws/samples/provider test

     

    To run a single specific test, you would run

    ant -Dtest=org.jboss.test.ws.jaxws.samples.provider.ProviderPayloadTestCase one-test

    This can be done in debug mode as well

     ant -Ddebug=true -Dtest=org.jboss.test.ws.jaxws.samples.provider.ProviderPayloadTestCase one-test

     

    Maven + Ant build (JBossWS 3.x)

    Note

    Make sure to copy/modify profiles.xml.example/profiles.xml accordingly before running the tasks below. Running the tests against another target container both means changing the deploy ant command ("ant deploy-jboss510" for instance) and the specified maven profile when running the tests. This simply means changing the specified profile to "jboss510" for instance. Also please note that the provided target profiles may change from release to release because of different supported AS containers.

    cd stack/native/trunk
    ant deploy-jboss600
    mvn -Ptestsuite,jboss600 test

    To run the collection of provider sample tests, you would run

    mvn -Ptestsuite,jboss600 -Dtest=jaxws/samples/provider test

     

    To run a single specific test, you would run

    mvn -Ptestsuite,jboss600 -Dtest=jaxws/samples/provider/ProviderPayloadTestCase test

    This can be done in debug mode as well

    mvn -Ptestsuite,jboss600 -Dtest=jaxws/samples/provider/ProviderPayloadTestCase -Dmaven.surefire.debug=true test

    Finally, depending on the Maven version you're using, you might need to set the jbossXYZ.home property:

    mvn -Ptestsuite,jboss600 -Djboss600.home=/home/user/jboss/build/output/jboss-6.0.0.Final test

    Please note that starting from JBossWS 4, the integration testsuites have been moved to the 'integration-test' maven phase. So you need to replace 'test' with 'integration-test' in the mvn commands above.

    Maven + Ant build (JBossWS 4.x)

    cd stack/cxf/trunk
    ant deploy-jboss710
    mvn -Pjboss710 -Djboss710.home=<path-to-jboss-710> integration-test

    To run the collection of provider sample tests, you would run

    mvn -Pjboss710 -Djboss710.home=<path-to-jboss-710> -Dtest=jaxws/samples/provider test integration-test

     

    To run a single specific test, you would run

    mvn -Pjboss710 -Djboss710.home=<path-to-jboss-710> -Dtest=jaxws/samples/provider/ProviderPayloadTestCase integration-test

    This can be done in debug mode as well

    mvn -Pjboss710 -Djboss710.home=<path-to-jboss-710> -Dtest=jaxws/samples/provider/ProviderPayloadTestCase -Dmaven.surefire.debug=true integration-test

     

    JBossWS-CXF Spring testsuite

    Starting from jbossws-cxf 3.4.0 just keep in mind that SpringFramework dependencies are not triggered by default anymore. You can add Spring to the testsuite client classpath as well as enable additional tests relying on Spring using the custom "spring" maven profile:

    mvn -Ptestsuite,jboss600,spring test

    Working with the Hudson QA environment

    The Hudson QA environment helps you to test any supported stack against any supported target container.

    Maven + Ant build

    The Hudson setup is still based on Ant. You just need to checkout the jbossws-framework and move to the "hudson" directory.

    cd jbossws/framework/trunk/hudson
    ant hudson-setup
    ant hudson-start


    When you hit http://localhost:8180/hudson you should be able to

    • log-in
    • build a target container
    • run a test-suite against the target container

    Publicly, Hudson is available at http://jbossws.jboss.org:8180/hudson/ (or http://jbossws.jboss.org:8280/hudson/ during QA release phase)