org.apache.tools.ant.taskdefs.optional.junit
Interface JUnitTaskMirror.JUnitTestRunnerMirror
- JUnitTestRunner
public static interface JUnitTaskMirror.JUnitTestRunnerMirror
Interface that test runners implement.
static int | ERRORS- An error occurred.
|
static int | FAILURES- Some tests failed.
|
static String | IGNORED_FILE_NAME- Used in formatter arguments as a placeholder for the basename
of the output file (which gets replaced by a test specific
output file name later).
|
static int | SUCCESS- No problems with this test.
|
ERRORS
public static final int ERRORS
An error occurred.
FAILURES
public static final int FAILURES
Some tests failed.
IGNORED_FILE_NAME
public static final String IGNORED_FILE_NAME
Used in formatter arguments as a placeholder for the basename
of the output file (which gets replaced by a test specific
output file name later).
SUCCESS
public static final int SUCCESS
No problems with this test.
getRetCode
public int getRetCode()
Returns what System.exit() would return in the standalone version.
- 2 if errors occurred, 1 if tests failed else 0.
handleErrorFlush
public void handleErrorFlush(String output)
Handle output sent to System.err.
output - coming from System.err
handleErrorOutput
public void handleErrorOutput(String output)
Handle output sent to System.err.
output - output for System.err
handleFlush
public void handleFlush(String output)
Handle output sent to System.out.
output - output for System.out.
handleInput
public int handleInput(byte[] buffer,
int offset,
int length)
throws IOException Handle an input request.
buffer - the buffer into which data is to be read.offset - the offset into the buffer at which data is stored.length - the amount of data to read.
- the number of bytes read.
handleOutput
public void handleOutput(String output)
Handle output sent to System.out.
output - output for System.out.
run
public void run()
Run the test.
setPermissions
public void setPermissions(Permissions perm)
Permissions for the test run.
perm - the permissions to use.