Methods Summary |
---|
public void | addError(junit.framework.Test test, java.lang.Throwable t)Empty
|
public void | addFailure(junit.framework.Test test, java.lang.Throwable t)Empty
|
public void | addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t)Interface TestListener for JUnit > 3.4.
A Test failed.
addFailure(test, (Throwable) t);
|
public void | endTest(junit.framework.Test test)Empty
|
public void | endTestSuite(JUnitTest suite)The whole testsuite ended.
String newLine = System.getProperty("line.separator");
StringBuffer sb = new StringBuffer("Tests run: ");
sb.append(suite.runCount());
sb.append(", Failures: ");
sb.append(suite.failureCount());
sb.append(", Errors: ");
sb.append(suite.errorCount());
sb.append(", Time elapsed: ");
sb.append(nf.format(suite.getRunTime() / 1000.0));
sb.append(" sec");
sb.append(newLine);
if (withOutAndErr) {
if (systemOutput != null && systemOutput.length() > 0) {
sb.append("Output:").append(newLine).append(systemOutput)
.append(newLine);
}
if (systemError != null && systemError.length() > 0) {
sb.append("Error: ").append(newLine).append(systemError)
.append(newLine);
}
}
try {
out.write(sb.toString().getBytes());
out.flush();
} catch (IOException ioex) {
throw new BuildException("Unable to write summary output", ioex);
} finally {
if (out != System.out && out != System.err) {
try {
out.close();
} catch (IOException e) {
// ignore
}
}
}
|
public void | setOutput(java.io.OutputStream out){@inheritDoc}.
this.out = out;
|
public void | setSystemError(java.lang.String err){@inheritDoc}.
systemError = err;
|
public void | setSystemOutput(java.lang.String out){@inheritDoc}.
systemOutput = out;
|
public void | setWithOutAndErr(boolean value)Should the output to System.out and System.err be written to
the summary.
withOutAndErr = value;
|
public void | startTest(junit.framework.Test t)Empty
|
public void | startTestSuite(JUnitTest suite)The testsuite started.
String newLine = System.getProperty("line.separator");
StringBuffer sb = new StringBuffer("Running ");
sb.append(suite.getName());
sb.append(newLine);
try {
out.write(sb.toString().getBytes());
out.flush();
} catch (IOException ioex) {
throw new BuildException("Unable to write summary output", ioex);
}
|