JUnit 3.8.1

junit.awtui
Class TestRunner

java.lang.Object
  extended byjunit.runner.BaseTestRunner
      extended byjunit.awtui.TestRunner
All Implemented Interfaces:
TestListener

public class TestRunner
extends BaseTestRunner

An AWT based user interface to run tests. Enter the name of a class which either provides a static suite method or is a subclass of TestCase.

 Synopsis: java junit.awtui.TestRunner [-noloading] [TestCase]
 
TestRunner takes as an optional argument the name of the testcase class to be run.


Field Summary
protected  Vector fExceptions
           
protected  Vector fFailedTests
           
protected  List fFailureList
           
protected  Frame fFrame
           
protected  Logo fLogo
           
protected  Label fNumberOfErrors
           
protected  Label fNumberOfFailures
           
protected  Label fNumberOfRuns
           
protected  ProgressBar fProgressIndicator
           
protected  Button fQuitButton
           
protected  Button fRerunButton
           
protected  Button fRun
           
protected  Thread fRunner
           
protected  TextField fStatusLine
           
protected  TextField fSuiteField
           
protected  TestResult fTestResult
           
protected  TextArea fTraceArea
           
protected  Checkbox fUseLoadingRunner
           
protected static Font PLAIN_FONT
           
 
Fields inherited from class junit.runner.BaseTestRunner
SUITE_METHODNAME
 
Constructor Summary
TestRunner()
           
 
Method Summary
protected  void addGrid(Panel p, Component co, int x, int y, int w, int fill, double wx, int anchor)
           
protected  void clearStatus()
          Clears the status message.
protected  Panel createCounterPanel()
           
protected  Menu createJUnitMenu()
          Creates the JUnit menu.
protected  void createMenus(MenuBar mb)
           
protected  TestResult createTestResult()
           
protected  Frame createUI(String suiteName)
           
 void failureSelected()
           
 Thread getRunner()
           
static void main(String[] args)
           
 void rerun()
           
protected  void reset()
           
static void run(Class test)
           
protected  void runFailed(String message)
          Override to define how to handle a failed loading of a test suite.
 void runSuite()
           
 void setSuiteName(String suite)
           
 void start(String[] args)
          Starts the TestRunner
 void testEnded(String testName)
           
 void testFailed(int status, Test test, Throwable t)
           
 void testStarted(String testName)
           
 
Methods inherited from class junit.runner.BaseTestRunner
addError, addFailure, elapsedTimeAsString, endTest, extractClassName, getFilteredTrace, getFilteredTrace, getLoader, getPreference, getPreference, getPreferences, getTest, inVAJava, loadSuiteClass, processArguments, savePreferences, setLoading, setPreference, setPreferences, showStackRaw, startTest, truncate, useReloadingTestSuiteLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fFrame

protected Frame fFrame

fExceptions

protected Vector fExceptions

fFailedTests

protected Vector fFailedTests

fRunner

protected Thread fRunner

fTestResult

protected TestResult fTestResult

fTraceArea

protected TextArea fTraceArea

fSuiteField

protected TextField fSuiteField

fRun

protected Button fRun

fProgressIndicator

protected ProgressBar fProgressIndicator

fFailureList

protected List fFailureList

fLogo

protected Logo fLogo

fNumberOfErrors

protected Label fNumberOfErrors

fNumberOfFailures

protected Label fNumberOfFailures

fNumberOfRuns

protected Label fNumberOfRuns

fQuitButton

protected Button fQuitButton

fRerunButton

protected Button fRerunButton

fStatusLine

protected TextField fStatusLine

fUseLoadingRunner

protected Checkbox fUseLoadingRunner

PLAIN_FONT

protected static final Font PLAIN_FONT
Constructor Detail

TestRunner

public TestRunner()
Method Detail

testStarted

public void testStarted(String testName)
Specified by:
testStarted in class BaseTestRunner

testEnded

public void testEnded(String testName)
Specified by:
testEnded in class BaseTestRunner

testFailed

public void testFailed(int status,
                       Test test,
                       Throwable t)
Specified by:
testFailed in class BaseTestRunner

addGrid

protected void addGrid(Panel p,
                       Component co,
                       int x,
                       int y,
                       int w,
                       int fill,
                       double wx,
                       int anchor)

createJUnitMenu

protected Menu createJUnitMenu()
Creates the JUnit menu. Clients override this method to add additional menu items.


createMenus

protected void createMenus(MenuBar mb)

createTestResult

protected TestResult createTestResult()

createUI

protected Frame createUI(String suiteName)

createCounterPanel

protected Panel createCounterPanel()

failureSelected

public void failureSelected()

getRunner

public Thread getRunner()

main

public static void main(String[] args)

run

public static void run(Class test)

rerun

public void rerun()

reset

protected void reset()

runFailed

protected void runFailed(String message)
Description copied from class: BaseTestRunner
Override to define how to handle a failed loading of a test suite.

Specified by:
runFailed in class BaseTestRunner

runSuite

public void runSuite()

setSuiteName

public void setSuiteName(String suite)

clearStatus

protected void clearStatus()
Description copied from class: BaseTestRunner
Clears the status message.

Overrides:
clearStatus in class BaseTestRunner

start

public void start(String[] args)
Starts the TestRunner


JUnit 3.8.1