junit.swingui
Class TestRunner

java.lang.Object
   |
   +--junit.runner.BaseTestRunner
         |
         +--junit.swingui.TestRunner
All Implemented Interfaces:
TestListener, TestRunContext

public class TestRunner
extends BaseTestRunner
implements TestRunContext

Field Summary
private static BOLD_FONT
          
private static final FAILUREDETAILVIEW_KEY
          
private static final GAP
          
private static final HISTORY_LENGTH
          
private static PLAIN_FONT
          
private static final TESTCOLLECTOR_KEY
          
private fCounterPanel
          
private fFailureView
          
private fFailures
          
protected fFrame
          
private fLogo
          
private fProgressIndicator
          
private fQuitButton
          
private fRerunButton
          
private fRun
          
private fRunner
          
private fStatusLine
          
private fSuiteCombo
          
private fTestResult
          
private fTestRunViews
          
private fTestViewTab
          
private fUseLoadingRunner
          
 
Fields inherited from class junit.runnerBaseTestRunner
SUITE_METHODNAME
 
Constructor Summary
TestRunner()
           
 
Method Summary
private voidabout()
          
protected voidaboutToStart(Test testSuite)
          
public voidaddError(Test test, Throwable t)
          
public voidaddFailure(Test test, AssertionFailedError t)
          
private voidaddGrid(JPanel p, Component co, int x, int y, int w, int fill, double wx, int anchor)
          
private voidaddToHistory(String suite)
          
private voidappendFailure(String kind, Test test, Throwable t)
          
public voidbrowseTestClasses()
          
protected voidclearStatus()
          
protected ComponentcreateBrowseButton()
          
protected CounterPanelcreateCounterPanel()
          
protected JPanelcreateFailedPanel()
          
protected FailureDetailViewcreateFailureDetailView()
          
protected JFramecreateFrame(String title)
          
protected JMenucreateJUnitMenu()
          
protected JLabelcreateLogo()
          
protected voidcreateMenus(JMenuBar mb)
          
protected JButtoncreateQuitButton()
          
protected JButtoncreateRunButton()
          
protected StatusLinecreateStatusLine()
          
protected JComboBoxcreateSuiteCombo()
          
TestCollectorcreateTestCollector()
          
protected TestResultcreateTestResult()
          
protected JTabbedPanecreateTestRunViews()
          
protected JFramecreateUI(String suiteName)
          
protected JCheckBoxcreateUseLoaderCheckBox()
          
private voiddoRunTest(Test testSuite)
          
public voidendTest(Test test)
          
public ListModelgetFailures()
          
public static IcongetIconResource(Class clazz, String name)
          
private FilegetSettingsFile()
          
protected StringgetSuiteText()
          
public voidhandleTestSelected(Test test)
          
public voidinsertUpdate(DocumentEvent event)
          
private ImageloadFrameIcon()
          
private voidloadHistory(JComboBox combo)
          
public static voidmain(String[] args)
          
private voidpostEndTest(Test test)
          
private voidpostInfo(String message)
          
private voidpostStatus(String status)
          
private voidpruneHistory()
          
public voidremoveUpdate(DocumentEvent event)
          
private voidrerun()
          
private voidrerunTest(Test test)
          
protected voidreset()
          
private voidrevealFailure(Test test)
          
public voidrun()
          
public static voidrun(Class test)
          
protected voidrunFailed(String message)
          
protected voidrunFinished(Test testSuite)
          
public synchronized voidrunSuite()
          
protected synchronized voidrunTest(Test testSuite)
          
private voidsaveHistory()
          
private voidsetButtonLabel(JButton button, String label)
          
private voidsetLabelValue(JTextField label, int value)
          
public voidsetSuite(String suiteName)
          
private booleanshouldReload()
          
private voidshowFailureDetail(Test test)
          
private voidshowInfo(String message)
          
private voidshowStatus(String status)
          
public voidstart(String[] args)
          
private voidstart(Test test)
          
public voidstartTest(Test test)
          
private voidsynchUI()
          
public voidterminate()
          
public voidtestViewChanged()
          
public voidtextChanged()
          
 
Methods inherited from class junit.runner.BaseTestRunner
elapsedTimeAsString, extractClassName, filterStack, getFilteredTrace, getLoader, getPreference, getPreference, getTest, inVAJava, loadSuiteClass, processArguments, setLoading, truncate, useReloadingTestSuiteLoader
  
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Field Detail

BOLD_FONT

private static Font BOLD_FONT

FAILUREDETAILVIEW_KEY

private static final String FAILUREDETAILVIEW_KEY
References to the field:
junit/swingui/TestRunner.java 189

GAP

private static final int GAP
References to the field:
junit/swingui/TestRunner.java 449
junit/swingui/TestRunner.java 449
junit/swingui/TestRunner.java 449
junit/swingui/TestRunner.java 449

HISTORY_LENGTH

private static final int HISTORY_LENGTH
References to the field:
junit/swingui/TestRunner.java 129

PLAIN_FONT

private static Font PLAIN_FONT

TESTCOLLECTOR_KEY

private static final String TESTCOLLECTOR_KEY
References to the field:
junit/swingui/TestRunner.java 481

fCounterPanel

private CounterPanel fCounterPanel
References to the field:
junit/swingui/TestRunner.java 70
junit/swingui/TestRunner.java 81
junit/swingui/TestRunner.java 102
junit/swingui/TestRunner.java 395
junit/swingui/TestRunner.java 424
junit/swingui/TestRunner.java 583
junit/swingui/TestRunner.java 749

fFailureView

private FailureDetailView fFailureView
References to the field:
junit/swingui/TestRunner.java 403
junit/swingui/TestRunner.java 404
junit/swingui/TestRunner.java 586
junit/swingui/TestRunner.java 712
junit/swingui/TestRunner.java 717

fFailures

private DefaultListModel fFailures
References to the field:
junit/swingui/TestRunner.java 137
junit/swingui/TestRunner.java 138
junit/swingui/TestRunner.java 398
junit/swingui/TestRunner.java 460
junit/swingui/TestRunner.java 587

fFrame

protected JFrame fFrame
References to the field:
junit/swingui/TestRunner.java 196
junit/swingui/TestRunner.java 469
junit/swingui/TestRunner.java 471
junit/swingui/TestRunner.java 488
junit/swingui/TestRunner.java 733
junit/swingui/TestRunner.java 734
junit/swingui/TestRunner.java 735
junit/swingui/TestRunner.java 774
junit/swingui/TestRunner.java 802

fLogo

private JLabel fLogo
References to the field:
junit/swingui/TestRunner.java 408
junit/swingui/TestRunner.java 422

fProgressIndicator

private ProgressBar fProgressIndicator
References to the field:
junit/swingui/TestRunner.java 103
junit/swingui/TestRunner.java 394
junit/swingui/TestRunner.java 421
junit/swingui/TestRunner.java 584
junit/swingui/TestRunner.java 748

fQuitButton

private JButton fQuitButton
References to the field:
junit/swingui/TestRunner.java 407
junit/swingui/TestRunner.java 432

fRerunButton

private JButton fRerunButton
References to the field:
junit/swingui/TestRunner.java 175
junit/swingui/TestRunner.java 176
junit/swingui/TestRunner.java 177
junit/swingui/TestRunner.java 184
junit/swingui/TestRunner.java 585
junit/swingui/TestRunner.java 702

fRun

private JButton fRun
References to the field:
junit/swingui/TestRunner.java 389
junit/swingui/TestRunner.java 390
junit/swingui/TestRunner.java 415
junit/swingui/TestRunner.java 600
junit/swingui/TestRunner.java 637
junit/swingui/TestRunner.java 654
junit/swingui/TestRunner.java 784

fRunner

private Thread fRunner
References to the field:
junit/swingui/TestRunner.java 601
junit/swingui/TestRunner.java 605
junit/swingui/TestRunner.java 626
junit/swingui/TestRunner.java 638
junit/swingui/TestRunner.java 655
junit/swingui/TestRunner.java 665

fStatusLine

private StatusLine fStatusLine
References to the field:
junit/swingui/TestRunner.java 406
junit/swingui/TestRunner.java 431
junit/swingui/TestRunner.java 721
junit/swingui/TestRunner.java 725
junit/swingui/TestRunner.java 789

fSuiteCombo

private JComboBox fSuiteCombo
References to the field:
junit/swingui/TestRunner.java 111
junit/swingui/TestRunner.java 115
junit/swingui/TestRunner.java 116
junit/swingui/TestRunner.java 117
junit/swingui/TestRunner.java 118
junit/swingui/TestRunner.java 119
junit/swingui/TestRunner.java 123
junit/swingui/TestRunner.java 124
junit/swingui/TestRunner.java 132
junit/swingui/TestRunner.java 133
junit/swingui/TestRunner.java 388
junit/swingui/TestRunner.java 413
junit/swingui/TestRunner.java 454
junit/swingui/TestRunner.java 456
junit/swingui/TestRunner.java 671
junit/swingui/TestRunner.java 672

fTestResult

private TestResult fTestResult
References to the field:
junit/swingui/TestRunner.java 70
junit/swingui/TestRunner.java 81
junit/swingui/TestRunner.java 101
junit/swingui/TestRunner.java 102
junit/swingui/TestRunner.java 103
junit/swingui/TestRunner.java 152
junit/swingui/TestRunner.java 162
junit/swingui/TestRunner.java 606
junit/swingui/TestRunner.java 627
junit/swingui/TestRunner.java 644
junit/swingui/TestRunner.java 646
junit/swingui/TestRunner.java 661
junit/swingui/TestRunner.java 662

fTestRunViews

private Vector fTestRunViews
References to the field:
junit/swingui/TestRunner.java 143
junit/swingui/TestRunner.java 150
junit/swingui/TestRunner.java 160
junit/swingui/TestRunner.java 355
junit/swingui/TestRunner.java 359
junit/swingui/TestRunner.java 373
junit/swingui/TestRunner.java 548

fTestViewTab

private JTabbedPane fTestViewTab
References to the field:
junit/swingui/TestRunner.java 373
junit/swingui/TestRunner.java 400
junit/swingui/TestRunner.java 426
junit/swingui/TestRunner.java 548

fUseLoadingRunner

private JCheckBox fUseLoadingRunner
References to the field:
junit/swingui/TestRunner.java 393
junit/swingui/TestRunner.java 417
junit/swingui/TestRunner.java 621
Constructor Detail

TestRunner

public  TestRunner()
Call sites to the constructor:
junit/swingui/TestRunner.java 58
Method Detail

about

private void about()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 213

Locals in the method:
about Line 803

aboutToStart

protected void aboutToStart(Test testSuite)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 663

Locals in the method:
e Line 150, Line 151
testSuite Line 152
v Line 152

addError

public void addError(Test test, Throwable t)

Locals in the method:
t Line 71
test Line 71

addFailure

public void addFailure(Test test, AssertionFailedError t)

Locals in the method:
t Line 82
test Line 82

addGrid

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

Locals in the method:
wx Line 445
y Line 442, Line 449
w Line 443
co Line 450
anchor Line 444
fill Line 446, Line 447, Line 447
x Line 442, Line 449
p Line 450
c Line 442, Line 442, Line 443, Line 444, Line 445, Line 446, Line 448, Line 449, Line 450

addToHistory

private void addToHistory(String suite)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 614

Locals in the method:
i Line 115, Line 115, Line 116, Line 117
suite Line 116, Line 118, Line 123

appendFailure

private void appendFailure(String kind, Test test, Throwable t)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 71

Locals in the method:
kind
t Line 137
test Line 137, Line 139

browseTestClasses

public void browseTestClasses()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 309

Locals in the method:
className Line 476, Line 477
collector Line 469
selector Line 470, Line 474, Line 475

clearStatus

protected void clearStatus()
Call sites to the method:
junit/swingui/TestRunner.java 785

createBrowseButton

protected Component createBrowseButton()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 391

Locals in the method:
browse Line 305, Line 306, Line 313
e

createCounterPanel

protected CounterPanel createCounterPanel()
Call sites to the method:
junit/swingui/TestRunner.java 395

createFailedPanel

protected JPanel createFailedPanel()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 401

Locals in the method:
e
failedPanel Line 184, Line 185

createFailureDetailView

protected FailureDetailView createFailureDetailView()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 403

Locals in the method:
className Line 190, Line 193
e
viewClass Line 193, Line 194

createFrame

protected JFrame createFrame(String title)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 382

Locals in the method:
e
frame Line 239, Line 240, Line 242, Line 249
icon Line 238, Line 239
title

createJUnitMenu

protected JMenu createJUnitMenu()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 264

Locals in the method:
event
event
menu Line 208, Line 218, Line 220, Line 230, Line 232
mi1 Line 210, Line 217, Line 218
mi2 Line 222, Line 229, Line 230

createLogo

protected JLabel createLogo()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 408

Locals in the method:
icon Line 255, Line 256
label Line 256, Line 258, Line 259, Line 260

createMenus

protected void createMenus(JMenuBar mb)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 384

Locals in the method:
mb Line 264

createQuitButton

protected JButton createQuitButton()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 407

Locals in the method:
e
quit Line 280, Line 287

createRunButton

protected JButton createRunButton()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 389

Locals in the method:
e
run Line 292, Line 293, Line 300

createStatusLine

protected StatusLine createStatusLine()
Call sites to the method:
junit/swingui/TestRunner.java 406

createSuiteCombo

protected JComboBox createSuiteCombo()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 388

Locals in the method:
combo Line 322, Line 323, Line 325, Line 335, Line 339, Line 348
e Line 329
e
event Line 342

createTestCollector

TestCollector createTestCollector()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 468

Locals in the method:
className Line 482, Line 485
collectorClass Line 485, Line 486
e

createTestResult

protected TestResult createTestResult()
Call sites to the method:
junit/swingui/TestRunner.java 661

createTestRunViews

protected JTabbedPane createTestRunViews()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 400

Locals in the method:
e
lv Line 355, Line 356
pane Line 356, Line 360, Line 362, Line 369
tv Line 359, Line 360

createUI

protected JFrame createUI(String suiteName)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 733

Locals in the method:
browseButton Line 414
failedPanel Line 429
failureLabel
frame Line 385, Line 390, Line 434, Line 435, Line 436, Line 437
mb Line 384, Line 385
panel Line 412, Line 413, Line 414, Line 415, Line 417, Line 418, Line 421, Line 422, Line 424, Line 427, Line 429, Line 431, Line 432, Line 434
splitter Line 427
suiteLabel Line 412
suiteName
tracePane Line 426

createUseLoaderCheckBox

protected JCheckBox createUseLoaderCheckBox()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 393

Locals in the method:
box Line 270, Line 272, Line 273
useLoader Line 269

doRunTest

private void doRunTest(Test testSuite)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 615
junit/swingui/TestRunner.java 631

Locals in the method:
endTime Line 650
runTime Line 651
startTime Line 650
testSuite Line 640, Line 644, Line 653, Line 663

endTest

public void endTest(Test test)

Locals in the method:
test Line 93

getFailures

public ListModel getFailures()
Call sites to the method:
junit/swingui/TestRunner.java 708

getIconResource

public static Icon getIconResource(Class clazz, String name)
Click to Locals in the Method
Call sites to the method:
junit/swingui/AboutDialog.java 73
junit/swingui/FailureRunView.java 30
junit/swingui/FailureRunView.java 31
junit/swingui/FailureRunView.java 97
junit/swingui/TestHierarchyRunView.java 32
junit/swingui/TestRunner.java 254
junit/swingui/TestRunner.java 495
junit/swingui/TestSuitePanel.java 30
junit/swingui/TestSuitePanel.java 31
junit/swingui/TestSuitePanel.java 32

Locals in the method:
clazz Line 793
name Line 793, Line 795
url Line 794, Line 798

getSettingsFile

private File getSettingsFile()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 502
junit/swingui/TestRunner.java 669

Locals in the method:
home Line 520

getSuiteText

protected String getSuiteText()
Call sites to the method:
junit/swingui/TestRunner.java 611
junit/swingui/TestRunner.java 784

handleTestSelected

public void handleTestSelected(Test test)

Locals in the method:
test Line 702, Line 702, Line 703

insertUpdate

public void insertUpdate(DocumentEvent event)

Locals in the method:
event

loadFrameIcon

private Image loadFrameIcon()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 237

Locals in the method:
icon Line 496, Line 497

loadHistory

private void loadHistory(JComboBox combo)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 335

Locals in the method:
br Line 506, Line 514
combo Line 507, Line 511
itemCount Line 508, Line 510
line Line 506, Line 507

main

public static void main(String[] args)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 63

Locals in the method:
args Line 58

postEndTest

private void postEndTest(Test test)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 93

Locals in the method:
test

postInfo

private void postInfo(String message)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 89
junit/swingui/TestRunner.java 641
junit/swingui/TestRunner.java 651

Locals in the method:
message Line 527

postStatus

private void postStatus(String status)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 647

Locals in the method:
status Line 537

pruneHistory

private void pruneHistory()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 125

Locals in the method:
historyLength Line 130, Line 131, Line 132
i Line 132, Line 132, Line 133

removeUpdate

public void removeUpdate(DocumentEvent event)

Locals in the method:
event

rerun

private void rerun()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 180

Locals in the method:
rerunTest Line 550, Line 551
view Line 549

rerunTest

private void rerunTest(Test test)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 551

Locals in the method:
args Line 565
classArgs Line 564
constructor Line 565
e
message Line 575, Line 577, Line 579
reloadedTest Line 565, Line 571, Line 573
reloadedTestClass Line 564
result Line 571, Line 574, Line 576
test Line 555, Line 556, Line 561, Line 563, Line 567

reset

protected void reset()
Call sites to the method:
junit/swingui/TestRunner.java 609
junit/swingui/TestRunner.java 629

revealFailure

private void revealFailure(Test test)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 139

Locals in the method:
e Line 143, Line 144
test Line 145
v Line 145

run

public void run()

run

public static void run(Class test)

Locals in the method:
test Line 62
args Line 63

runFailed

protected void runFailed(String message)

Locals in the method:
message Line 599

runFinished

protected void runFinished(Test testSuite)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 653

Locals in the method:
e Line 160, Line 161
testSuite Line 162
v Line 162

runSuite

public synchronized void runSuite()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 296
junit/swingui/TestRunner.java 330
junit/swingui/TestRunner.java 595
junit/swingui/TestRunner.java 739

Locals in the method:
suiteName Line 612, Line 614
testSuite Line 613, Line 615

runTest

protected synchronized void runTest(Test testSuite)

Locals in the method:
testSuite Line 630, Line 631

saveHistory

private void saveHistory()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 776

Locals in the method:
bw Line 673, Line 674, Line 677
i Line 671, Line 671, Line 672
testsuite Line 673, Line 673

setButtonLabel

private void setButtonLabel(JButton button, String label)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 637
junit/swingui/TestRunner.java 654

Locals in the method:
button Line 685
label Line 685

setLabelValue

private void setLabelValue(JTextField label, int value)

Locals in the method:
label Line 695
value Line 695

setSuite

public void setSuite(String suiteName)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 477
junit/swingui/TestRunner.java 738

Locals in the method:
suiteName Line 111

shouldReload

private boolean shouldReload()
Call sites to the method:
junit/swingui/TestRunner.java 608

showFailureDetail

private void showFailureDetail(Test test)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 703

Locals in the method:
failure Line 711, Line 712
failures Line 709, Line 710
i Line 709, Line 709, Line 710
test Line 707, Line 711

showInfo

private void showInfo(String message)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 527
junit/swingui/TestRunner.java 556
junit/swingui/TestRunner.java 567
junit/swingui/TestRunner.java 575
junit/swingui/TestRunner.java 610

Locals in the method:
message Line 721

showStatus

private void showStatus(String status)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 537
junit/swingui/TestRunner.java 577
junit/swingui/TestRunner.java 579
junit/swingui/TestRunner.java 599

Locals in the method:
status Line 725

start

public void start(String[] args)
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 58

Locals in the method:
args Line 732
suiteName Line 733, Line 737, Line 738

start

private void start(Test test)

Locals in the method:
test Line 747
total Line 748, Line 749

startTest

public void startTest(Test test)

Locals in the method:
test Line 89

synchUI

private void synchUI()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 97

Locals in the method:
e

terminate

public void terminate()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 225
junit/swingui/TestRunner.java 245
junit/swingui/TestRunner.java 283

Locals in the method:
e

testViewChanged

public void testViewChanged()
Click to Locals in the Method
Call sites to the method:
junit/swingui/TestRunner.java 365

Locals in the method:
view Line 374

textChanged

public void textChanged()
Call sites to the method:
junit/swingui/TestRunner.java 328
junit/swingui/TestRunner.java 343
junit/swingui/TestRunner.java 464
junit/swingui/TestRunner.java 544