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

Previous Previous     Contents     Next Next

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.

ProcedureTo Configure Your Build Environment

  1. Set the following environment variables in your shell environment to use the build infrastructure that comes with the TCK:

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

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

  3. Change to the <TS_HOME>/bin directory and edit the ts.jte file to set the required properties needed for using Ant build environment.

    1. webserver.home to the directory in which the Java Web Services Developers Pack is installed.

    2. webserver.host to the host on which the Web server is running.

    3. webserver.port to the port on which the Web server is running.

    4. webserver.container to supported web container used for testing.

ProcedureTo Build the Tests

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

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

    This cleans and builds all the test directories under the api directory.

ProcedureTo Deploy the Tests

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

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

ProcedureTo Run the Tests

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

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

  3. 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 Previous     Contents     Next Next
Company Info Contact Terms of Use Privacy Copyright 1994-2006 Sun Microsystems, Inc.