|
UTF-X, Unit Testing Framework - Xslt | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream java.io.FilterOutputStream java.io.PrintStream utfx.printers.ResultPrinter
public abstract class ResultPrinter
Abstract result printer. Result printers are used for printing test run
results. General idea based on junit.textui.ResultPrinter
. In
this implementation we allow for different result printers to be attached to
the TestResult object and print the results of a test run in various ways.
Copyright © 2004 - University of Southern Queensland.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
$Source: /cvs/utf-x/framework/src/java/utfx/printers/ResultPrinter.java,v $
Field Summary | |
---|---|
protected java.lang.String |
indentString
indent string |
protected org.apache.log4j.Logger |
log
loggin facility |
private long |
startTime
start time in milliseconds |
protected int |
suiteDepth
the depth of the current suite; root test suite = 0 |
protected int |
testCaseCount
total test case conter; first test = 1 |
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
ResultPrinter(java.io.OutputStream os)
Construnct a new Result Printer from an OutputStream. |
Method Summary | |
---|---|
void |
endTest(junit.framework.Test test)
end a test |
abstract void |
endTestCase(junit.framework.TestCase testCase)
End of a test case. |
abstract void |
endTestSuite(junit.framework.TestSuite suite)
End of a test suite. |
java.lang.String |
getIndent(int depth)
|
void |
printElapsedTimeMillis()
Print the number of milli seconds that elapsed since the start() method was called. |
abstract void |
printErrors(junit.framework.TestResult result)
Print errors. |
abstract void |
printFailures(junit.framework.TestResult result)
Print failures. |
abstract void |
printFooter(junit.framework.TestResult result)
Print report header. |
abstract void |
printHeader(junit.framework.TestResult result)
Print report header. |
void |
printIndent()
|
void |
printSummary(junit.framework.TestResult result)
Print the result summary. |
protected void |
setIndentString(java.lang.String indentString)
Specific result printers can se the indent string to what ever they like. |
void |
start()
This method is called before any test runs. |
void |
startTest(junit.framework.Test test)
Start a test |
abstract void |
startTestCase(junit.framework.TestCase testCase)
Start of a test case. |
abstract void |
startTestSuite(junit.framework.TestSuite suite)
Start of a test suite. |
Methods inherited from class java.io.PrintStream |
---|
append, append, append, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write |
Methods inherited from class java.io.FilterOutputStream |
---|
write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface junit.framework.TestListener |
---|
addError, addFailure |
Field Detail |
---|
protected int suiteDepth
protected int testCaseCount
protected java.lang.String indentString
private long startTime
protected org.apache.log4j.Logger log
Constructor Detail |
---|
public ResultPrinter(java.io.OutputStream os)
Method Detail |
---|
public java.lang.String getIndent(int depth)
public void printSummary(junit.framework.TestResult result)
junit.textui.ResultPrinter
result
- test resultpublic abstract void printHeader(junit.framework.TestResult result)
junit.textui.ResultPrinter
public abstract void printFooter(junit.framework.TestResult result)
junit.textui.ResultPrinter
public abstract void printErrors(junit.framework.TestResult result)
junit.textui.ResultPrinter
result
- test resultpublic abstract void printFailures(junit.framework.TestResult result)
junit.textui.ResultPrinter
result
- test resultpublic abstract void startTestCase(junit.framework.TestCase testCase)
testCase
- the TestSuite we are entering.public abstract void endTestCase(junit.framework.TestCase testCase)
testCase
- public abstract void startTestSuite(junit.framework.TestSuite suite)
suite
- the TestSuite we are entering.public abstract void endTestSuite(junit.framework.TestSuite suite)
suite
- the test suite we are leavingpublic final void startTest(junit.framework.Test test)
startTest
in interface junit.framework.TestListener
public final void endTest(junit.framework.Test test)
endTest
in interface junit.framework.TestListener
public void start()
public void printElapsedTimeMillis()
protected void setIndentString(java.lang.String indentString)
indentString
- new indent string. This string will be used as a
single unit of indentation. Indentation = indentString *
suiteDepth.public void printIndent()
|
UTF-X, Unit Testing Framework - Xslt | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |