Overview

Test harness to make the development of the JAX-WS unit tests easier.

Quick Start

Maven plugin

Prefered way to run tests using WS Test Harness to use its maven plugin.

Command line

This example shows how to run WS Test Harness from the command line:

$ mvn org.glassfish.metro:harness-maven-plugin:ws-test -Dargs=arg1,opt1,arg2,arg3,opt3 -DvmArgs=vm1,vm2

Following options are available for the -Dargs property:

 -client VAL                       : Just run a single client script, instead of all
 -concurrent-side-effect-free      : Run all side-effect free tests as concurrent
 -cp:jaxws JAXWS_HOME              : classpath option path to JAX-WS RI workspace
 -cp:jaxws-image JAXWS_HOME        : classpath option path to JAX-WS RI dist image
 -cp:override VAL                  : these jars and folders are placed in front of other -cp:*** options. Useful for overriding some jars
 -cp:wsit WSIT_HOME                : classpath option path to WSIT workspace
 -cp:wsit-image WSIT_HOME          : classpath option path to the WSIT dist image
 -debug                            : Generate output for debugging harness
 -dump                             : Enable all transport dumps
 -emma FILE                        : Generate emma coverage report
 -external-wsgen FILE              : use external wsgen.sh/.bat
 -external-wsimport FILE           : use external tool.sh/.bat
 -glassfish-local GLASSFISH_HOME   : Launch Glassfish from the harness and test with it
 -glassfish-remote CONFIG          : Test with remote Glassfish. Needs both JMX connection info and HTTP URL.
                                     CONFIG=[USER:PASS@]HOST[:PORT][-HTTPURL] e.g., admin:adminadmin@localhost:4848-http://localhost:8080/
                                     Defaults: USER=admin, PASS=adminadmin, PORT=4848, HTTPURL=http://HOST/
 -glassfishv3-local GLASSFISH_HOME : Launch Glassfish v3 from the harness and test with it
 -httpspi                          : use JAX-WS 2.2 httpspi API deployment for servlet containers
 -jaxwsInJDK                       : tests using JAX-WS impl in JDK
 -jetty-embedded JETTY_HOME        : loads Jetty into the harness VM and test with it.
 -leave                            : leave the container running after all the tests are completed. Often useful for debugging problems.
 -legacy-local                     : Emergency! I need to use the legacy local transport!
 -lwhs                             : tests using the Java lightweight HTTP server
 -p N                              : run multiple tests in parallel
 -port N                           : Choose the TCP port used for local/embedded container-based tests. Set to -1 to choose random port.
 -r                                : find test directories recursively
 -report DIR                       : Generate JUnit test report XMLs
 -skip                             : skip all code generation and reuse the artifacts generated during the last run
 -targetVersion VERSION            : Specify the target JAX-WS runtime version. This determines target option for the WS Tools to generate code compliant with the runtime version
 -tomcat-embedded TOMCAT_HOME      : loads Tomcat into the harness VM and test with it.
 -tomcat-local TOMCAT_HOME         : Launch Tomcat from the harness and test with it
 -tomcat-remote CONFIG             : Test with remote Tomcat. CONFIG=[USER:PASS@]HOST[:PORT].
                                     Defaults: USER=admin, PASS=admin, PORT=8080
 -transport FILE                   : specify the pluggable transport jar
 -version VERSION                  : Specify the target JAX-WS version being tested. This determines test exclusions
 -wsgen [always|both|ignore]       : Control the packaging of Wrapper and Exception beans.
                                     always - Beans are packaged.
                                     both - Test case is executed twice, with and without packaging beans.
                                     ignore - Beans are NOT packaged.
        

More examples are available in the guide.

Terms of Use; Privacy Policy; Copyright ©2013-2014 (revision 20140418.2d69abc)
 
 
Close
loading
Please Confirm
Close