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

Previous Previous     Contents     Next Next
Chapter 5

Executing Tests

The SAAJ TCK uses the JavaTest harness to execute the tests in the test suite. For detailed instructions that explain how to run and use JavaTest, see the JavaTest User's Guide and Reference in the documentation bundle.

This chapter includes the following topics:


Note - The instructions in this chapter assume that you have installed and configured your test environment as described in Chapter 3 and Chapter 4, respectively.


5.1 Starting JavaTest

There are two general ways to run the SAAJ TCK using the JavaTest harness software:

  • Through the JavaTest GUI

  • From the command line in your shell environment


Note - The tsant command referenced in the following two procedures and elsewhere in this guide is a wrapper around the Ant build tool, which is included in the SAAJ TCK bundle. The build.xml file in <TS_HOME>/bin contains the various Ant targets for the SAAJ TCK test suite


ProcedureTo Start JavaTest in GUI Mode

  • Change to the <TS_HOME>/bin directory and execute the tsant gui target:

    cd <TS_HOME>/bin
    ./tsant gui

ProcedureTo Start JavaTest in Command-Line Mode

  1. Change to any subdirectory under <TS_HOME>/src/com/sun/ts/tests.

  2. Execute the tsant runclient target to start the JavaTest run:

    <TS_HOME>/bin/tsant runclient

    For example, to run the SAAJ TCK signature tests, enter the following commands:

    cd <TS_HOME>/src/com/sun/ts/tests/signaturetest/saaj
    <TS_HOME>/bin/tsant runclient

5.2 Running a Subset of the Tests

ProcedureTo Run a Subset of Tests in GUI Mode

  1. Click Configure->Change Configuration->Tests to Run from the JavaTest main menu.

    The tabbed Configuration Editor dialog is displayed.

  2. Click Specify from the option list on the left.

  3. Select the tests you want to run from the displayed test tree, and then click Done.

    You can select entire branches of the test tree, or use Ctrl+Click or Shift+Click to select multiple tests or ranges of tests, respectively.

  4. Click Save File.

  5. Click Run Tests->Start to run the tests you selected.

    Alternatively, you can right-click the test you want from the test tree in the left pane of the JavaTest main window, and choose Execute These Tests from the popup menu.

  6. Click Report->Create Report.

  7. Specify the directory in which the JavaTest test harness will write the report, and then click OK.

    A report is created, and you are asked whether you want to view it.

  8. Click Yes to view the report.

ProcedureTo Run a Subset of Tests in Command-Line Mode

  1. Change to the directory containing the tests you want to run.

    For example, <TS_HOME>/src/com/sun/ts/tests/signaturetest/saaj.

  2. Start the test run by executing the following command:

    <TS_HOME>/bin/tsant runclient

    The tests in <TS_HOME>/src/com/sun/ts/tests/signaturetest/saaj and its subdirectories are run.

ProcedureTo Run a Subset of Tests in Batch Mode Based on Prior Result Status

You can run certain tests in batch mode based on the test's prior run status by specifying the priorStatus system property when invoking tsant.

  • Invoke tsant with the priorStatus property.

    The accepted values for the priorStatus property are any combination of the following:

    • fail

    • pass

    • error

    • notRun

    For example, you could run all the SAAJ tests with a status of failed and error by invoking the following commands:

    cd $TS_HOME/src/com/sun/ts/tests/signaturetest
    $TS_HOME/bin/tsant -DpriorStatus="fail,error" runclient

    Note that multiple priorStatus values must be separated by commas.

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