| |||||||||||||||||||
5.3 Building/Deploying/Running SAAJ TCK Tests Using tsantYou can use tsant, an implementation of Ant bundled with the SAAJ TCK, to build, deploy, and run the test suite.
|
setenv TS_HOME /path_to_saajtck |
Bourne Shell
TS_HOME=/path_to_saajtck export TS_HOME |
ANT_HOME to the directory in which the ANT software is installed.
C Shell
setenv ANT_HOME ${TS_HOME}/tools/ant |
Bourne Shell
ANT_HOME=${TS_HOME}/tools/ant export ANT_HOME |
TS_HOME/bin to your PATH in your command shell.
C Shell
setenv PATH ${TS_HOME}/bin:${PATH} |
Bourne Shell
PATH=${TS_HOME}/bin:${PATH} export PATH |
JAVA_HOME to the directory in which the Java SE 5 software is installed.
C Shell
setenv JAVA_HOME /path_to_jdk15 |
Bourne Shell
JAVA_HOME=/path_to_jdk15 export TS_HOME |
Change to the <TS_HOME>/install/saaj directory and run ant to create and set up your <TS_HOME>/bin directory if it has not yet been set up.
Change to the <TS_HOME>/bin directory and edit the ts.jte file to set the required properties needed for using Ant build environment.
webserver.home to the directory in which the Java Web Services Developers Pack is installed.
webserver.host to the host on which the Web server is running.
webserver.port to the port on which the Web server is running.
webserver.container to supported web container used for testing.
To build a single test directory, type the following:
cd <TS_HOME>/src/com/sun/ts/tests/saaj/api/javax_xml_soap/AttachmentPart tsant clean build |
This cleans and builds the tests in the AttachmentPart test directory.
To list the classes directory for this test that was built, type:
tsant lc |
or
tsant llc |
To list the distribution directory of archives for this test that was built, type:
tsant ld |
or
tsant lld |
To build a subset of test directories, type:
cd <TS_HOME>/src/com/sun/ts/tests/saaj/api tsant clean build |
This cleans and builds all the test directories under the api directory.
To deploy a single test directory, type the following:
cd <TS_HOME>/src/com/sun/ts/tests/saaj/api/javax_xml_soap/AttachmentPart tsant deploy |
This deploys the WAR file built for the AttachmentPart test directory to the webapps directory.
To deploy a subset of test directories, type:
cd <TS_HOME>/src/com/sun/ts/tests/saaj/api tsant deploy |
This deploys all the test WAR files for the api directory.
To run a single test directory, type the following:
cd <TS_HOME>/src/com/sun/ts/tests/saaj/api/javax_xml_soap/AttachmentPart tsant runclient |
This runs all tests in the AttachmentPart test directory.
To run a single test within a test directory, type:
cd <TS_HOME>/src/com/sun/ts/tests/saaj/api/javax_xml_soap/AttachmentPart tsant runclient -Dtest=getMimeHeader1Test |
This runs only the getMimeHeader1Test in the AttachmentPart test directory. You select the test name to run by looking at the testName tags in the URLClient.java file.
To run a subset of test directories type:
cd <TS_HOME>/src/com/sun/ts/tests/saaj/api tsant runclient |
This runs all the test directories under the api directory.
![]() ![]() |