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

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

| Previous Contents 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: 5.1 Starting JavaTest 5.2 Running a Subset of the Tests 5.3 Building/Deploying/Running SAAJ TCK Tests Using `tsant` 5.4 Test Reports 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 ### To Start JavaTest in GUI Mode Change to the `<TS_HOME>/bin` directory and execute the `tsant gui` target:
      cd <TS_HOME>/bin
      ./tsant gui
2. ### To Start JavaTest in Command-Line Mode Change to any subdirectory under `<TS_HOME>/src/com/sun/ts/tests`. 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 ### To Run a Subset of Tests in GUI Mode Click Configure->Change Configuration->Tests to Run from the JavaTest main menu. The tabbed Configuration Editor dialog is displayed. Click Specify from the option list on the left. 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. Click Save File. 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. Click Report->Create Report. 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. Click Yes to view the report. ### To Run a Subset of Tests in Command-Line Mode Change to the directory containing the tests you want to run. For example, `<TS_HOME>/src/com/sun/ts/tests/signaturetest/saaj`. 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. ### To 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 Contents Next

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