sun.com docs.sun.com | My Sun Worldwide Sites

|  | Products |  | Downloads |  | Service & Solutions |  | Support |  | Training |  | Research

| Previous Contents Next
1. 1. - ## 5.3 Building/Deploying/Running SAAJ TCK Tests Using `tsant` You can use `tsant`, an implementation of Ant bundled with the SAAJ TCK, to build, deploy, and run the test suite. ### To Configure Your Build Environment Set the following environment variables in your shell environment to use the build infrastructure that comes with the TCK: `TS_HOME` to the directory in which the SAAJ TCK software is installed. C Shell
            setenv TS_HOME /path_to_saajtck
      - Bourne Shell
            TS_HOME=/path_to_saajtck
            export TS_HOME
   2. - `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
   3. - `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
   4. - `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
1. 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 the Tests 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
2. 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
3. To list the distribution directory of archives for this test that was built, type:
       tsant ld
   or
       tsant lld
4. To build a subset of test directories, type:
       cd <TS_HOME>/src/com/sun/ts/tests/saaj/api
       tsant clean build
1. This cleans and builds all the test directories under the `api` directory. ### To Deploy the Tests 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
2. 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
1. This deploys all the test WAR files for the `api` directory. ### To Run the Tests 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
2. 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
3. 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.
| Previous Contents Next

Company Info Contact Terms of Use Privacy Copyright 1994-2006 Sun Microsystems, Inc.