|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--junit.runner.BaseTestRunner
|
+--org.jlf.util.JUnitTestRunner
This class is an enhanced version of the JUnit junit.textui.TestRunner class to be run inside a servlet/JSP with an output writer. Here is the remainder of the class definition from JUnit: A command line based tool to run tests.
java junit.textui.TestRunner [-wait] TestCaseClassTestRunner expects the name of a TestCase class as argument. If this class defines a static
suite method it
will be invoked and the returned test is run. Otherwise all
the methods starting with "test" having no arguments are run.
When the wait command line argument is given TestRunner waits until the users types RETURN.
TestRunner prints a trace as the tests are executed followed by a summary at the end.
| Field Summary |
| Fields inherited from class junit.runner.BaseTestRunner |
SUITE_METHODNAME |
| Constructor Summary | |
JUnitTestRunner()
Constructs a TestRunner. |
|
JUnitTestRunner(java.io.PrintWriter writer)
Constructs a TestRunner using the print stream for all the output |
|
| Method Summary | |
void |
addError(junit.framework.Test test,
java.lang.Throwable t)
|
void |
addFailure(junit.framework.Test test,
junit.framework.AssertionFailedError t)
|
protected junit.framework.TestResult |
createTestResult()
Creates the TestResult to be used for the test run. |
junit.framework.TestResult |
doRun(junit.framework.Test suite,
boolean wait)
|
void |
endTest(junit.framework.Test test)
|
junit.runner.TestSuiteLoader |
getLoader()
Always use the StandardTestSuiteLoader. |
static void |
main(java.lang.String[] args)
|
protected void |
pause(boolean wait)
|
void |
print(junit.framework.TestResult result)
Prints failures to the standard output |
void |
printErrors(junit.framework.TestResult result)
Prints the errors to the standard output |
void |
printFailures(junit.framework.TestResult result)
Prints failures to the standard output |
void |
printHeader(junit.framework.TestResult result)
Prints the header of the report |
static void |
run(java.lang.Class testClass)
Runs a suite extracted from a TestCase subclass. |
static void |
run(junit.framework.Test suite)
Runs a single test and collects its results. |
static void |
runAndWait(junit.framework.Test suite)
Runs a single test and waits until the user types RETURN. |
protected void |
runFailed(java.lang.String message)
|
junit.framework.TestResult |
start(java.lang.String[] args)
Starts a test run. |
void |
startTest(junit.framework.Test test)
|
protected java.io.PrintWriter |
writer()
|
| Methods inherited from class junit.runner.BaseTestRunner |
clearStatus, elapsedTimeAsString, extractClassName, filterStack, getFilteredTrace, getPreference, getPreference, getTest, inVAJava, loadSuiteClass, processArguments, setLoading, truncate, useReloadingTestSuiteLoader |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JUnitTestRunner()
public JUnitTestRunner(java.io.PrintWriter writer)
| Method Detail |
public junit.runner.TestSuiteLoader getLoader()
getLoader in class junit.runner.BaseTestRunner
public void addError(junit.framework.Test test,
java.lang.Throwable t)
addError in interface junit.framework.TestListeneraddError in class junit.runner.BaseTestRunner
public void addFailure(junit.framework.Test test,
junit.framework.AssertionFailedError t)
addFailure in interface junit.framework.TestListeneraddFailure in class junit.runner.BaseTestRunnerprotected junit.framework.TestResult createTestResult()
public junit.framework.TestResult doRun(junit.framework.Test suite,
boolean wait)
protected void pause(boolean wait)
public void startTest(junit.framework.Test test)
startTest in interface junit.framework.TestListenerstartTest in class junit.runner.BaseTestRunnerpublic void endTest(junit.framework.Test test)
endTest in interface junit.framework.TestListenerendTest in class junit.runner.BaseTestRunnerpublic static void main(java.lang.String[] args)
public void print(junit.framework.TestResult result)
public void printErrors(junit.framework.TestResult result)
public void printFailures(junit.framework.TestResult result)
public void printHeader(junit.framework.TestResult result)
public static void run(java.lang.Class testClass)
public static void run(junit.framework.Test suite)
public static void main (String[] args) {
test.textui.TestRunner.run(suite());
}
public static void runAndWait(junit.framework.Test suite)
public junit.framework.TestResult start(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionprotected void runFailed(java.lang.String message)
runFailed in class junit.runner.BaseTestRunnerprotected java.io.PrintWriter writer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||