ch.javasoft.junit.textui
Class TestRunner

java.lang.Object
  extended by junit.textui.TestRunner
      extended by ch.javasoft.junit.textui.TestRunner

public class TestRunner
extends TestRunner

A command line based tool to run tests.

 java junit.textui.TestRunner [-wait] TestCaseClass
 
TestRunner 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.


Constructor Summary
TestRunner()
          Constructs a TestRunner.
TestRunner(PrintStream writer)
          Constructs a TestRunner using the given stream for all the output
TestRunner(ResultPrinter printer)
          Constructs a TestRunner using the given ResultPrinter all the output
 
Method Summary
 Test getTest(String suiteClassName)
           
static void main(String[] args)
           
 TestResult start(String[] args)
          Starts a test run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestRunner

public TestRunner()
Constructs a TestRunner.


TestRunner

public TestRunner(PrintStream writer)
Constructs a TestRunner using the given stream for all the output


TestRunner

public TestRunner(ResultPrinter printer)
Constructs a TestRunner using the given ResultPrinter all the output

Method Detail

getTest

public Test getTest(String suiteClassName)

start

public TestResult start(String[] args)
                 throws Exception
Starts a test run. Analyzes the command line arguments and runs the given test suite.

Throws:
Exception

main

public static void main(String[] args)