Class BinaryTestWriter

java.lang.Object
com.sun.javatest.finder.BinaryTestWriter

public class BinaryTestWriter extends Object
BinaryTestWriter creates the data file used by BinaryTestFinder. It uses a test finder to find all the tests in a test suite and writes them out in a compact compressed form. By default it uses the standard tag test finder, and writes the output in a file called testsuite.jtd in the root directory of the test suite.
Options:
-finder finderClass finderArgs ... -end
the test finder to be used to locate the tests; the default is the standard tag test finder
-strictFinder
Do not ignore errors from the source finder, exit with error code instead
-o output-file
specify the name of the output file; the default is testsuite.jtd in the root directory of the test suite.
testsuite
(Required.) The test suite root file.
initial-files
(Optional)Any initial starting points within the test suite: the default is the test suite root
  • Constructor Details

    • BinaryTestWriter

      public BinaryTestWriter()
  • Method Details

    • main

      public static void main(String... args)
      Standard program entry point.
      Parameters:
      args - An array of strings, typically provided via the command line. The arguments should be of the form:
      [options] testsuite [tests]
      Options
      -finder finderClass finderArgs ... -end The name of a test finder class and any arguments it might take. The results of reading this test finder will be stored in the output file.
      -o output-file The output file in which to write the results.
    • run

      Main work method. Reads all the arguments on the command line, makes sure a valid testFinder is available, and then calls methods to create the tree of tests and then write the binary file.
      Parameters:
      args - An array of strings, typically provided via the command line
      Returns:
      The disposition of the run, i.e. zero for a problem-free execution, non-zero if there was some sort of problem.
      Throws:
      BinaryTestWriter.BadArgs - if a problem is found in the arguments provided
      BinaryTestWriter.Fault - if a fault is found while running
      IOException - if a problem is found while trying to read a file or write the output file
      See Also: