org.glassfish.pfl.test
Interface JUnitReportWriter

All Known Implementing Classes:
XMLJUnitReportWriter

public interface JUnitReportWriter

This Interface describes classes that format the results of a JUnit testrun.


Nested Class Summary
static class JUnitReportWriter.TestCounts
           
static class JUnitReportWriter.TestDescription
           
 
Method Summary
 void addError(JUnitReportWriter.TestDescription test, java.lang.Throwable t)
          An error occurred.
 void addFailure(JUnitReportWriter.TestDescription test, java.lang.Throwable t)
          A failure occurred.
 void endTest(JUnitReportWriter.TestDescription test)
          A test ended.
 void endTest(JUnitReportWriter.TestDescription test, long duration)
          A test ended.
 JUnitReportWriter.TestCounts endTestSuite()
          The whole testsuite ended.
 void setOutput(java.io.OutputStream out)
          Sets the stream the formatter is supposed to write its results to.
 void setSystemError(java.lang.String err)
          This is what the test has written to System.err
 void setSystemOutput(java.lang.String out)
          This is what the test has written to System.out
 void startTest(JUnitReportWriter.TestDescription test)
          A test started.
 void startTestSuite(java.lang.String name, java.util.Properties props)
          The whole testsuite started.
 

Method Detail

startTestSuite

void startTestSuite(java.lang.String name,
                    java.util.Properties props)
The whole testsuite started.

Parameters:
suite - the suite.

setOutput

void setOutput(java.io.OutputStream out)
Sets the stream the formatter is supposed to write its results to.

Parameters:
out - the output stream to use.

setSystemOutput

void setSystemOutput(java.lang.String out)
This is what the test has written to System.out

Parameters:
out - the string to write.

setSystemError

void setSystemError(java.lang.String err)
This is what the test has written to System.err

Parameters:
err - the string to write.

startTest

void startTest(JUnitReportWriter.TestDescription test)
A test started.


addError

void addError(JUnitReportWriter.TestDescription test,
              java.lang.Throwable t)
An error occurred.


addFailure

void addFailure(JUnitReportWriter.TestDescription test,
                java.lang.Throwable t)
A failure occurred.


endTest

void endTest(JUnitReportWriter.TestDescription test)
A test ended.


endTest

void endTest(JUnitReportWriter.TestDescription test,
             long duration)
A test ended. Here we supply the duration, in case the duration is not determined by the [ startTest, endTest ] interval.


endTestSuite

JUnitReportWriter.TestCounts endTestSuite()
The whole testsuite ended.

Parameters:
suite - the suite.