net.groboclown.junit.v1
Class XmlTestRunner
java.lang.Object
|
+--net.groboclown.junit.v1.XmlTestRunner
- All Implemented Interfaces:
- junit.framework.TestListener
- public class XmlTestRunner
- extends Object
- implements junit.framework.TestListener
A variation on Kent Beck's TestRunner implementations.
- See Also:
junit.textui.TestRunner
,
junit.swingui.TestRunner
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
fWriter
PrintStream fWriter
XmlTestRunner
public XmlTestRunner()
XmlTestRunner
public XmlTestRunner(PrintStream writer)
main
public static void main(String[] args)
- Called from the command line.
- Parameters:
args
- the command line arguments
run
public static void run(Class testClass)
run
public static void run(junit.framework.Test suite)
run
public static void run(junit.framework.Test suite,
PrintStream writer)
startTest
public void startTest(junit.framework.Test test)
- Specified by:
startTest
in interface junit.framework.TestListener
addError
public void addError(junit.framework.Test test,
Throwable t)
- Specified by:
addError
in interface junit.framework.TestListener
addFailure
public void addFailure(junit.framework.Test test,
junit.framework.AssertionFailedError t)
- Specified by:
addFailure
in interface junit.framework.TestListener
endTest
public void endTest(junit.framework.Test test1)
- Specified by:
endTest
in interface junit.framework.TestListener
doRun
protected boolean doRun(junit.framework.Test suite)
- Stdout and stderr are not trapped.
- Returns:
- true if the suite ran successfully, or
false if it failed.
printHeader
public void printHeader(junit.framework.Test suite)
printSummary
public void printSummary(junit.framework.TestResult result,
long runTime)
printFooter
public void printFooter(junit.framework.Test suite)
start
protected boolean start(String[] args)
createTestResult
protected junit.framework.TestResult createTestResult()
help
protected void help()
- Display the proper syntax for calling this class.
writer
private PrintStream writer()
extractClassName
private String extractClassName(String className)
Written under the LGPL