Interface JUnitTaskMirror.JUnitTestRunnerMirror
-
- All Known Implementing Classes:
JUnitTestRunner
- Enclosing interface:
- JUnitTaskMirror
public static interface JUnitTaskMirror.JUnitTestRunnerMirrorInterface that test runners implement.
-
-
Field Summary
Fields Modifier and Type Field Description static intERRORSAn error occurred.static intFAILURESSome tests failed.static java.lang.StringIGNORED_FILE_NAMEUsed 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 intSUCCESSNo problems with this test.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddFormatter(JUnitTaskMirror.JUnitResultFormatterMirror formatter)Add a formatter to the test.intgetRetCode()Returns what System.exit() would return in the standalone version.voidhandleErrorFlush(java.lang.String output)Handle output sent to System.err.voidhandleErrorOutput(java.lang.String output)Handle output sent to System.err.voidhandleFlush(java.lang.String output)Handle output sent to System.out.inthandleInput(byte[] buffer, int offset, int length)Handle an input request.voidhandleOutput(java.lang.String output)Handle output sent to System.out.voidrun()Run the test.voidsetPermissions(Permissions perm)Permissions for the test run.
-
-
-
Field Detail
-
IGNORED_FILE_NAME
static final java.lang.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).- Since:
- Ant 1.6.3
- See Also:
- Constant Field Values
-
SUCCESS
static final int SUCCESS
No problems with this test.- See Also:
- Constant Field Values
-
FAILURES
static final int FAILURES
Some tests failed.- See Also:
- Constant Field Values
-
ERRORS
static final int ERRORS
An error occurred.- See Also:
- Constant Field Values
-
-
Method Detail
-
setPermissions
void setPermissions(Permissions perm)
Permissions for the test run.- Parameters:
perm- the permissions to use.
-
run
void run()
Run the test.
-
addFormatter
void addFormatter(JUnitTaskMirror.JUnitResultFormatterMirror formatter)
Add a formatter to the test.- Parameters:
formatter- the formatter to use.
-
getRetCode
int getRetCode()
Returns what System.exit() would return in the standalone version.- Returns:
- 2 if errors occurred, 1 if tests failed else 0.
-
handleErrorFlush
void handleErrorFlush(java.lang.String output)
Handle output sent to System.err.- Parameters:
output- coming from System.err
-
handleErrorOutput
void handleErrorOutput(java.lang.String output)
Handle output sent to System.err.- Parameters:
output- output for System.err
-
handleOutput
void handleOutput(java.lang.String output)
Handle output sent to System.out.- Parameters:
output- output for System.out.
-
handleInput
int handleInput(byte[] buffer, int offset, int length) throws java.io.IOExceptionHandle an input request.- Parameters:
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.- Returns:
- the number of bytes read.
- Throws:
java.io.IOException- if the data cannot be read.
-
handleFlush
void handleFlush(java.lang.String output)
Handle output sent to System.out.- Parameters:
output- output for System.out.
-
-