TestRunner
Keywords: junit.awtui.TestRunner class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## junit.awtui
Class TestRunner

    java.lang.Object
      junit.runner.BaseTestRunner
          junit.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 java.util.Vector` | `fExceptions`
`protected java.util.Vector` | `fFailedTests`
`protected java.awt.List` | `fFailureList`
`protected java.awt.Frame` | `fFrame`
`protected Logo` | `fLogo`
`protected java.awt.Label` | `fNumberOfErrors`
`protected java.awt.Label` | `fNumberOfFailures`
`protected java.awt.Label` | `fNumberOfRuns`
`protected ProgressBar` | `fProgressIndicator`
`protected java.awt.Button` | `fQuitButton`
`protected java.awt.Button` | `fRerunButton`
`protected java.awt.Button` | `fRun`
`protected java.lang.Thread` | `fRunner`
`protected java.awt.TextField` | `fStatusLine`
`protected java.awt.TextField` | `fSuiteField`
`protected TestResult` | `fTestResult`
`protected java.awt.TextArea` | `fTraceArea`
`protected java.awt.Checkbox` | `fUseLoadingRunner`
`protected static java.awt.Font` | `PLAIN_FONT`

Fields inherited from class junit.runner.BaseTestRunner
`SUITE_METHODNAME`

Constructor Summary
`TestRunner()`

Method Summary
`protected void` | `addGrid(java.awt.Panel p, java.awt.Component co, int x, int y, int w, int fill, double wx, int anchor)`
`protected void` | `clearStatus()` Clears the status message.
`protected java.awt.Panel` | `createCounterPanel()`
`protected java.awt.Menu` | `createJUnitMenu()` Creates the JUnit menu.
`protected void` | `createMenus(java.awt.MenuBar mb)`
`protected TestResult` | `createTestResult()`
`protected java.awt.Frame` | `createUI(java.lang.String suiteName)`
`void` | `failureSelected()`
`java.lang.Thread` | `getRunner()`
`static void` | `main(java.lang.String[] args)`
`void` | `rerun()`
`protected void` | `reset()`
`static void` | `run(java.lang.Class test)`
`protected void` | `runFailed(java.lang.String message)` Override to define how to handle a failed loading of a test suite.
`void` | `runSuite()`
`void` | `setSuiteName(java.lang.String suite)`
`void` | `start(java.lang.String[] args)` Starts the TestRunner
`void` | `testEnded(java.lang.String testName)`
`void` | `testFailed(int status, Test test, java.lang.Throwable t)`
`void` | `testStarted(java.lang.String testName)`

Methods inherited from class junit.runner.BaseTestRunner
`addError, addFailure, elapsedTimeAsString, endTest, extractClassName, getFilteredTrace, getFilteredTrace, getLoader, getPreference, getPreference, getPreferences, getTest, inMac, 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 java.awt.Frame fFrame

### fExceptions

    protected java.util.Vector fExceptions

### fFailedTests

    protected java.util.Vector fFailedTests

### fRunner

    protected java.lang.Thread fRunner

### fTestResult

    protected TestResult fTestResult

### fTraceArea

    protected java.awt.TextArea fTraceArea

### fSuiteField

    protected java.awt.TextField fSuiteField

### fRun

    protected java.awt.Button fRun

### fProgressIndicator

    protected ProgressBar fProgressIndicator

### fFailureList

    protected java.awt.List fFailureList

### fLogo

    protected Logo fLogo

### fNumberOfErrors

    protected java.awt.Label fNumberOfErrors

### fNumberOfFailures

    protected java.awt.Label fNumberOfFailures

### fNumberOfRuns

    protected java.awt.Label fNumberOfRuns

### fQuitButton

    protected java.awt.Button fQuitButton

### fRerunButton

    protected java.awt.Button fRerunButton

### fStatusLine

    protected java.awt.TextField fStatusLine

### fUseLoadingRunner

    protected java.awt.Checkbox fUseLoadingRunner

### PLAIN_FONT

    protected static final java.awt.Font PLAIN_FONT

Constructor Detail

### TestRunner

    public TestRunner()

Method Detail

### testStarted

    public void testStarted(java.lang.String testName)

  Specified by:
    `testStarted` in class `BaseTestRunner`

### testEnded

    public void testEnded(java.lang.String testName)

  Specified by:
    `testEnded` in class `BaseTestRunner`

### testFailed

    public void testFailed(int status,
                           Test test,
                           java.lang.Throwable t)

  Specified by:
    `testFailed` in class `BaseTestRunner`

### addGrid

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

### createJUnitMenu

    protected java.awt.Menu createJUnitMenu()

  Creates the JUnit menu. Clients override this method to add additional menu items.

### createMenus

    protected void createMenus(java.awt.MenuBar mb)

### createTestResult

    protected TestResult createTestResult()

### createUI

    protected java.awt.Frame createUI(java.lang.String suiteName)

### createCounterPanel

    protected java.awt.Panel createCounterPanel()

### failureSelected

    public void failureSelected()

### getRunner

    public java.lang.Thread getRunner()

### main

    public static void main(java.lang.String[] args)

### run

    public static void run(java.lang.Class test)

### rerun

    public void rerun()

### reset

    protected void reset()

### runFailed

    protected void runFailed(java.lang.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(java.lang.String suite)

### clearStatus

    protected void clearStatus()

  Description copied from class: `BaseTestRunner`
  Clears the status message.

  Overrides:
    `clearStatus` in class `BaseTestRunner`

### start

    public void start(java.lang.String[] args)

  Starts the TestRunner

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD