JBoss Community

JBossWS - Running the test suites

modified by Alessio Soldano in JBoss Web Services Development - View the full document

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
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

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

Working with JBossWS-Native

The jbossws native test-suite is a super set of the general JAX-WS test-suite. It tests our native stack, JAX-RPC, the tools layer, etc. This shows how to run the full core test-suite against JBoss-6.0

 

Ant build

cd stack/native/trunk
./build.sh deploy-jboss600
./build.sh tests-main
./build.sh tests

 

 

Maven + Ant build

When running the testsuite, the Maven build always performs both common and stack specific tests, so nothing different from what's explained above in "Working with the integration layers" is required.

 

Working with JBossWS-CXF

The jbossws cxf test-suite is a super set of the general JAX-WS test-suite. It tests the jbossws-cxf integration, JAX-RPC, the tools layer, etc. This shows how to run the full core test-suite against JBoss-6.0

 

Ant build

cd stack/cxf/trunk
./build.sh deploy-jboss600
./build.sh tests-main
./build.sh tests

Maven + Ant build

When running the testsuite, the Maven build always performs both common and stack specific tests, so nothing different from what's explained above in "Working with the integration layers" is required.

Starting from 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)

Comment by going to Community

Create a new document in JBoss Web Services Development at Community