Top Description Inners Methods
org.glassfish.pfl.test

public Interface JUnitReportWriter

Known Direct Implementers
org.glassfish.pfl.test.XMLJUnitReportWriter
Imports
java.io.OutputStream, java.util.Properties, org.glassfish.pfl.basic.contain.Pair, .Triple

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
public void
endTest(JUnitReportWriter.TestDescription test, long duration)

A test ended.

public JUnitReportWriter.TestCounts
endTestSuite()

The whole testsuite ended.

public void
setOutput(OutputStream
the output stream to use.
out
)

Sets the stream the formatter is supposed to write its results to.

public void
setSystemError(String
the string to write.
err
)

This is what the test has written to System.err

public void
setSystemOutput(String
the string to write.
out
)

This is what the test has written to System.out

public void
public void
startTestSuite(String
the suite.
name
,
Properties props)

The whole testsuite started.

Method Detail

addErrorback to summary
public void addError(JUnitReportWriter.TestDescription test, Throwable t)

An error occurred.

addFailureback to summary
public void addFailure(JUnitReportWriter.TestDescription test, Throwable t)

A failure occurred.

endTestback to summary
public void endTest(JUnitReportWriter.TestDescription test)

A test ended.

endTestback to summary
public 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.

endTestSuiteback to summary
public JUnitReportWriter.TestCounts endTestSuite()

The whole testsuite ended.

setOutputback to summary
public void setOutput(OutputStream out)

Sets the stream the formatter is supposed to write its results to.

Parameters
out:OutputStream

the output stream to use.

setSystemErrorback to summary
public void setSystemError(String err)

This is what the test has written to System.err

Parameters
err:String

the string to write.

setSystemOutputback to summary
public void setSystemOutput(String out)

This is what the test has written to System.out

Parameters
out:String

the string to write.

startTestback to summary
public void startTest(JUnitReportWriter.TestDescription test)

A test started.

startTestSuiteback to summary
public void startTestSuite(String name, Properties props)

The whole testsuite started.

Parameters
name:String

the suite.

org.glassfish.pfl.test back to summary

public Class JUnitReportWriter.TestCounts

extends Triple<Integer, Integer, Integer>
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
TestCounts(int pass, int fail, int error)

Method Summary

Modifier and TypeMethod and Description
public int
public int
fail()

public int
pass()

Inherited from org.glassfish.pfl.basic.contain.Triple:
equalsfirsthashCodesecondthird

Constructor Detail

TestCountsback to summary
public TestCounts(int pass, int fail, int error)

Method Detail

errorback to summary
public int error()
failback to summary
public int fail()
passback to summary
public int pass()
org.glassfish.pfl.test back to summary

public Class JUnitReportWriter.TestDescription

extends Pair<String, String>
Class Inheritance

Field Summary

Inherited from org.glassfish.pfl.basic.contain.Pair:
_first_second

Constructor Summary

AccessConstructor and Description
public
TestDescription(String name, String className)

Method Summary

Modifier and TypeMethod and Description
public String
public String
public String
toString()

Overrides org.glassfish.pfl.basic.contain.Pair.toString.

Returns a string representation of the object.

Inherited from org.glassfish.pfl.basic.contain.Pair:
equalsfirsthashCodesecond

Constructor Detail

TestDescriptionback to summary
public TestDescription(String name, String className)

Method Detail

getClassNameback to summary
public String getClassName()
getNameback to summary
public String getName()
toStringback to summary
public String toString()

Overrides org.glassfish.pfl.basic.contain.Pair.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override