public class TestRunner extends BaseTestRunner implements TestRunContext
Synopsis: java junit.swingui.TestRunner [-noloading] [TestCase]TestRunner takes as an optional argument the name of the testcase class to be run.
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JFrame |
fFrame |
SUITE_METHODNAME
Constructor and Description |
---|
TestRunner() |
Modifier and Type | Method and Description |
---|---|
protected void |
aboutToStart(Test testSuite) |
void |
browseTestClasses() |
protected void |
clearStatus()
Clears the status message.
|
protected java.awt.Component |
createBrowseButton() |
protected CounterPanel |
createCounterPanel() |
protected javax.swing.JPanel |
createFailedPanel() |
protected FailureDetailView |
createFailureDetailView() |
protected javax.swing.JFrame |
createFrame() |
protected javax.swing.JMenu |
createJUnitMenu()
Creates the JUnit menu.
|
protected javax.swing.JLabel |
createLogo() |
protected void |
createMenus(javax.swing.JMenuBar mb) |
protected javax.swing.JButton |
createQuitButton() |
protected javax.swing.JButton |
createRunButton() |
protected StatusLine |
createStatusLine() |
protected javax.swing.JComboBox |
createSuiteCombo() |
protected TestResult |
createTestResult() |
protected javax.swing.JTabbedPane |
createTestRunViews() |
protected javax.swing.JFrame |
createUI(java.lang.String suiteName) |
protected javax.swing.JCheckBox |
createUseLoaderCheckBox() |
javax.swing.ListModel |
getFailures()
Returns the failure model
|
static javax.swing.Icon |
getIconResource(java.lang.Class clazz,
java.lang.String name) |
protected java.lang.String |
getSuiteText() |
void |
handleTestSelected(Test test)
Handles the selection of a Test.
|
void |
insertUpdate(javax.swing.event.DocumentEvent event) |
protected java.lang.Object |
instanciateClass(java.lang.String fullClassName,
java.lang.Object param) |
static void |
main(java.lang.String[] args) |
void |
removeUpdate(javax.swing.event.DocumentEvent event) |
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.
|
protected void |
runFinished(Test testSuite) |
void |
runSuite() |
protected void |
runTest(Test testSuite) |
void |
setSuite(java.lang.String suiteName) |
void |
start(java.lang.String[] args)
Starts the TestRunner
|
void |
terminate()
Terminates the TestRunner
|
void |
testEnded(java.lang.String stringName) |
void |
testFailed(int status,
Test test,
java.lang.Throwable t) |
void |
testStarted(java.lang.String testName) |
void |
testViewChanged() |
void |
textChanged() |
addError, addFailure, elapsedTimeAsString, endTest, extractClassName, getFilteredTrace, getFilteredTrace, getLoader, getPreference, getPreference, getPreferences, getTest, inMac, inVAJava, loadSuiteClass, processArguments, savePreferences, setLoading, setPreference, setPreferences, showStackRaw, startTest, truncate, useReloadingTestSuiteLoader
public static void main(java.lang.String[] args)
public static void run(java.lang.Class test)
public void testFailed(int status, Test test, java.lang.Throwable t)
testFailed
in class BaseTestRunner
public void testStarted(java.lang.String testName)
testStarted
in class BaseTestRunner
public void testEnded(java.lang.String stringName)
testEnded
in class BaseTestRunner
public void setSuite(java.lang.String suiteName)
protected void aboutToStart(Test testSuite)
protected void runFinished(Test testSuite)
protected CounterPanel createCounterPanel()
protected javax.swing.JPanel createFailedPanel()
protected FailureDetailView createFailureDetailView()
protected javax.swing.JMenu createJUnitMenu()
protected javax.swing.JFrame createFrame()
protected javax.swing.JLabel createLogo()
protected void createMenus(javax.swing.JMenuBar mb)
protected javax.swing.JCheckBox createUseLoaderCheckBox()
protected javax.swing.JButton createQuitButton()
protected javax.swing.JButton createRunButton()
protected java.awt.Component createBrowseButton()
protected StatusLine createStatusLine()
protected javax.swing.JComboBox createSuiteCombo()
protected javax.swing.JTabbedPane createTestRunViews()
public void testViewChanged()
protected TestResult createTestResult()
protected javax.swing.JFrame createUI(java.lang.String suiteName)
protected java.lang.String getSuiteText()
public javax.swing.ListModel getFailures()
TestRunContext
getFailures
in interface TestRunContext
public void insertUpdate(javax.swing.event.DocumentEvent event)
protected java.lang.Object instanciateClass(java.lang.String fullClassName, java.lang.Object param)
public void browseTestClasses()
public void removeUpdate(javax.swing.event.DocumentEvent event)
protected void reset()
protected void runFailed(java.lang.String message)
BaseTestRunner
runFailed
in class BaseTestRunner
public void runSuite()
protected void runTest(Test testSuite)
public void handleTestSelected(Test test)
TestRunContext
handleTestSelected
in interface TestRunContext
public void start(java.lang.String[] args)
public void terminate()
public void textChanged()
protected void clearStatus()
BaseTestRunner
clearStatus
in class BaseTestRunner
public static javax.swing.Icon getIconResource(java.lang.Class clazz, java.lang.String name)