Package 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
Modifier and TypeMethodDescriptionrun
(String[] args, PrintWriter out1, PrintWriter out2) Runs the test embodied by the implementation.
-
Method Details
-
run
Runs the test embodied by the implementation.- Parameters:
args
- These are supplied by thescript
running the test, typically derived from values in thetest 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.
-