|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.runner.BaseTestRunner | +--junit.textui.TestRunner
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.
Fields inherited from class junit.runner.BaseTestRunner |
SUITE_METHODNAME |
Constructor Summary | |
TestRunner()
Constructs a TestRunner. |
|
TestRunner(java.io.PrintStream writer)
Constructs a TestRunner using the given stream for all the output |
Method Summary | |
void |
addError(Test test,
java.lang.Throwable t)
An error occurred. |
void |
addFailure(Test test,
AssertionFailedError t)
A failure occurred. |
TestResult |
doRun(Test suite,
boolean wait)
|
void |
endTest(Test test)
A test ended. |
TestSuiteLoader |
getLoader()
Always use the StandardTestSuiteLoader. |
static void |
main(java.lang.String[] args)
|
void |
print(TestResult result)
Prints failures to the standard output |
void |
printErrors(TestResult result)
Prints the errors to the standard output |
void |
printFailures(TestResult result)
Prints failures to the standard output |
void |
printHeader(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(Test suite)
Runs a single test and collects its results. |
static void |
runAndWait(Test suite)
Runs a single test and waits until the user types RETURN. |
void |
startTest(Test test)
A test started. |
Methods inherited from class junit.runner.BaseTestRunner |
elapsedTimeAsString, extractClassName, filterStack, getFilteredTrace, getPreference, getPreference, getTest, inVAJava, setLoading, truncate |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TestRunner()
public TestRunner(java.io.PrintStream writer)
Method Detail |
public TestSuiteLoader getLoader()
getLoader
in class BaseTestRunner
public void addError(Test test, java.lang.Throwable t)
TestListener
public void addFailure(Test test, AssertionFailedError t)
TestListener
public TestResult doRun(Test suite, boolean wait)
public void startTest(Test test)
TestListener
public void endTest(Test test)
TestListener
public static void main(java.lang.String[] args)
public void print(TestResult result)
public void printErrors(TestResult result)
public void printFailures(TestResult result)
public void printHeader(TestResult result)
public static void run(java.lang.Class testClass)
public static void run(Test suite)
public static void main (String[] args) { test.textui.TestRunner.run(suite()); }
public static void runAndWait(Test suite)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |