⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
junit.swingui

Class TestRunner

java.lang.Object
|
+--junit.runner.BaseTestRunner
   |
   +--junit.swingui.TestRunner


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

static Font

PLAIN_FONT

Vector

fExceptions

Vector

fFailedTests

List

fFailureList

Frame

fFrame

An AWT based user interface to run tests.

Logo

fLogo

Label

fNumberOfErrors

Label

fNumberOfFailures

Label

fNumberOfRuns

ProgressBar

fProgressIndicator

Button

fQuitButton

Button

fRerunButton

Button

fRun

Thread

fRunner

TextField

fStatusLine

TextField

fSuiteField

TestResult

fTestResult

TextArea

fTraceArea

Checkbox

fUseLoadingRunner

Constructor Summary

TestRunner()

Method Summary

void

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

void

clearStatus()

Panel

createCounterPanel()

Menu

createJUnitMenu()

Creates the JUnit menu.

void

createMenus(MenuBar mb)

TestResult

createTestResult()

Frame

createUI(String suiteName)

void

failureSelected()

Thread

getRunner()

static void

main(String[] args)

void

rerun()

void

reset()

static void

run(Class test)

void

runFailed(String message)

synchronized 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)

Field Details

PLAIN_FONT

protected static final Font PLAIN_FONT


fExceptions

protected Vector fExceptions


fFailedTests

protected Vector fFailedTests


fFailureList

protected List fFailureList


fFrame

protected Frame fFrame

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.


fLogo

protected Logo fLogo


fNumberOfErrors

protected Label fNumberOfErrors


fNumberOfFailures

protected Label fNumberOfFailures


fNumberOfRuns

protected Label fNumberOfRuns


fProgressIndicator

protected ProgressBar fProgressIndicator


fQuitButton

protected Button fQuitButton


fRerunButton

protected Button fRerunButton


fRun

protected Button fRun


fRunner

protected Thread fRunner


fStatusLine

protected TextField fStatusLine


fSuiteField

protected TextField fSuiteField


fTestResult

protected TestResult fTestResult


fTraceArea

protected TextArea fTraceArea


fUseLoadingRunner

protected Checkbox fUseLoadingRunner

Constructor Details

TestRunner

public TestRunner()

Method Details

addGrid

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

Parameters:
p
co
x
y
w
fill
wx
anchor

clearStatus

protected void clearStatus()


createCounterPanel

protected Panel createCounterPanel()


createJUnitMenu

protected Menu createJUnitMenu()

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


createMenus

protected void createMenus(MenuBar mb)

Parameters:
mb

createTestResult

protected TestResult createTestResult()


createUI

protected Frame createUI(String suiteName)

Parameters:
suiteName

failureSelected

public void failureSelected()


getRunner

public Thread getRunner()


main

public static void main(String[] args)

Parameters:
args

rerun

public void rerun()


reset

protected void reset()


run

public static void run(Class test)

Parameters:
test

runFailed

protected void runFailed(String message)

Parameters:
message

runSuite

public synchronized void runSuite()


setSuiteName

public void setSuiteName(String suite)

Parameters:
suite

start

public void start(String[] args)

Starts the TestRunner

Parameters:
args

testEnded

public void testEnded(String testName)

Parameters:
testName

testFailed

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

Parameters:
status
test
t

testStarted

public void testStarted(String testName)

Parameters:
testName