|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--j2meunit.textui.TestRunner
A command line based tool to run tests.
java test.textui.TestRunner 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 | |
protected java.io.PrintStream |
fWriter
|
Constructor Summary | |
TestRunner()
Default constructor. |
|
TestRunner(java.io.PrintStream writer)
Constructor with a specific output stream. |
Method Summary | |
void |
addError(Test test,
java.lang.Throwable t)
DOCUMENT ME! |
void |
addFailure(Test test,
AssertionFailedError e)
DOCUMENT ME! |
protected TestResult |
createTestResult()
Creates the TestResult to be used for the test run. |
protected void |
doRun(Test suite)
DOCUMENT ME! |
void |
endTest(Test test)
DOCUMENT ME! |
void |
endTestStep(Test test)
TestListener.endTestStep() |
static void |
main(java.lang.String[] args)
main entry point. |
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 |
protected java.lang.String |
processArguments(java.lang.String[] args)
Starts a test run. |
static void |
run(Test suite)
Runs a single test and collects its results. |
protected void |
start(java.lang.String[] args)
Starts a test run. |
void |
startTest(Test test)
DOCUMENT ME! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.PrintStream fWriter
Constructor Detail |
public TestRunner()
public TestRunner(java.io.PrintStream writer)
writer
- The PrintStream to write the results toMethod Detail |
public void addError(Test test, java.lang.Throwable t)
addError
in interface TestListener
test
- DOCUMENT ME!t
- DOCUMENT ME!public void addFailure(Test test, AssertionFailedError e)
addFailure
in interface TestListener
test
- DOCUMENT ME!e
- DOCUMENT ME!public void endTest(Test test)
endTest
in interface TestListener
test
- DOCUMENT ME!public void endTestStep(Test test)
endTestStep
in interface TestListener
test
- The test of which a step has finishedpublic static void main(java.lang.String[] args)
args
- DOCUMENT ME!public void print(TestResult result)
result
- DOCUMENT ME!public void printErrors(TestResult result)
result
- DOCUMENT ME!public void printFailures(TestResult result)
result
- DOCUMENT ME!public void printHeader(TestResult result)
result
- DOCUMENT ME!public static void run(Test suite)
public static void main (String[] args) { test.textui.TestRunner.run(suite()); }
suite
- DOCUMENT ME!public void startTest(Test test)
startTest
in interface TestListener
test
- DOCUMENT ME!protected TestResult createTestResult()
protected void doRun(Test suite)
suite
- DOCUMENT ME!protected java.lang.String processArguments(java.lang.String[] args)
args
- DOCUMENT ME!
protected void start(java.lang.String[] args)
args
- DOCUMENT ME!
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |