com.sun.javatest
Interface Test

All Known Implementing Classes:
MultiTest

public interface Test

This interface is implemented by tests to be run by standard scripts. Information about the test is normally contained in a test description. A test should also define `main' as follows:

 
        public static void main(String[] args) {
            Test t = new test-class-name();
            Status s = t.run(args, new PrintWriter(System.err), new PrintWriter(System.out));
            s.exit();
        }
 
 
Defining `main' like this means that the test can also be run standalone, independent of the harness.


Method Summary
 Status run(java.lang.String[] args, java.io.PrintWriter out1, java.io.PrintWriter out2)
          Runs the test embodied by the implementation.
 

Method Detail

run

Status run(java.lang.String[] args,
           java.io.PrintWriter out1,
           java.io.PrintWriter out2)
Runs the test embodied by the implementation.

Parameters:
args - These are supplied by the script running the test, typically derived from values in the test description. and allow a script to provide configuration information to a test, or to reuse a test with different test values.
out1 - A stream to which to report errors. This stream was previously called "err".
out2 - An additional stream to which to report messages. This stream was previously called "out".
Returns:
A Status object representing the outcome of the test.


Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.