Package com.sun.javatest.finder
Class BinaryTestWriter
java.lang.Object
com.sun.javatest.finder.BinaryTestWriter
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:
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This exception is used to report bad command line arguments.static class
This exception is used to report problems that occur while running. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BinaryTestWriter
public BinaryTestWriter()
-
-
Method Details
-
main
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 providedBinaryTestWriter.Fault
- if a fault is found while runningIOException
- if a problem is found while trying to read a file or write the output file- See Also:
-