class GUIRunner extends Object
GUIRunner.TestProgressBar.
GUIRunner.StatisticsTestState.
GUIRunner.HierarchyWrapper.
This needs support from the classes and
GUIRunner.TreePathIterator,
GUIRunner.TestTreeCellRenderer.
GUIRunner.TestCaseLister.
GUIRunner.StackTraceLister.
GUIRunner.TabChangeListener
and the interface GUIRunner.Selector.
GUIRunListeners
to report the current state of the testsuitey.
Created: Sat Jun 3 18:29:52 2006| Modifier and Type | Class and Description |
|---|---|
(package private) class |
GUIRunner.ClassChooser
Provides a method to choose a test class.
|
(package private) static class |
GUIRunner.HierarchyWrapper
Represents the hierarchy of testsuites and testcases
as a tree
GUIRunner.HierarchyWrapper.hierarchyTree possibly with a single selected node
given by GUIRunner.HierarchyWrapper.singleSelectedNode. |
(package private) static interface |
GUIRunner.Selector
Minimal interface for notifying about singular selection events.
|
(package private) static class |
GUIRunner.StackTraceLister
Represents the stack trace of the throwable,
GUIRunner.StackTraceLister.thrw
currently selected in the error list. |
(package private) static class |
GUIRunner.StatisticsTestState
Represents the table displaying the number of runs,
both, passed and to be performed altogether,
the tests already ignored and those a failure or an error was found.
|
(package private) static class |
GUIRunner.TabChangeListener
A listener to the switching of a tab in the foreground;
the other in the background.
|
(package private) static class |
GUIRunner.TestCaseLister
Represents the list of testcases already failed
shown in one of the tabs
and a
GUIRunner.TestCaseLister.stackTraceLister
which represents the stack trace box below the tabbed pane. |
(package private) static class |
GUIRunner.TestListCellRenderer
A special renderer object
consisting of a label and a location within java code
for an item in a failure list.
|
(package private) static class |
GUIRunner.TestProgressBar
The progress bar indicating how much of the testcases already passed.
|
(package private) static class |
GUIRunner.TestTreeCellRenderer
To render a cell of the hierarchy tree.
|
(package private) static class |
GUIRunner.TreePathIterator
Represents a path
GUIRunner.TreePathIterator.currPath
in the tree of testsuites represented by GUIRunner.TreePathIterator.treeModel. |
| Modifier and Type | Field and Description |
|---|---|
private static String |
CHOOSE_CLASSPATH
The name of the system property
the value of which points to the directory
which is opened by the file chooser.
|
private GUIRunner.ClassChooser |
classChooser
A chooser for testclasses.
|
private JLabel |
className
Contains the fully qualified name of the testclasse
currently under consideration.
|
private JFrame |
frame
The frame in which the Testrunne GUI is displayed.
|
private static ImageIcon |
HIERARCHY_ICON
The icon representing the hierarchy of tests:
used for the tabbed pane.
|
private static Component |
HORIZ_BOUNDARY
Represents the horizontal space used for the boundary.
|
private static Component |
HORIZ_BOUNDARY2
Represents double of the horizontal space used for the boundary.
|
private static int |
HORIZ_FRAME
The horizontal size of the frame.
|
private static ImageIcon |
LOGO_ICON
The (big) JUnit-logo.
|
private GUIRunner.TestProgressBar |
progress
The progress bar indicating how much of the testcases already passed.
|
private static ImageIcon |
SMALL_LOGO_ICON
The small JUnit-logo on top left of this frame.
**** still this is not displayed properly ****.
|
private static String |
SOURCEPATH
The name of the system property
the value of which is the source path.
|
private JSplitPane |
splitPane
Represents the split pane with a tabbed pane as top component
and the stack trace box as bottom component.
|
private GUIRunner.StatisticsTestState |
statisticsTestState
Represents the table displaying the number of runs,
both passed and to be performed altogether,
the tests already ignored and those in which an error was found.
|
private JLabel |
statusBar
Contains a status message.
|
private GUIRunner.TestCaseLister |
testCaseLister
Represents the list of testcases already failed.
|
private GUIRunner.HierarchyWrapper |
testHierarchy
Represents the hierarchy of testcases.
|
private static Component |
VERTI_BOUNDARY
Represents the vertical space used for the boundary.
|
private static int |
VERTI_FRAME
The vertical size of the frame.
|
| Constructor and Description |
|---|
GUIRunner(Actions actions)
Creates a new
GUIRunner instance
which defines components with unloaded test class. |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
noteReportResult(TestCase testCase)
Notifies that the singular test
testCase is finished,
whether successful or not or that a test is ignored
after invoking noteTestStartedI(Quality)
with parameter Quality.Ignored. |
(package private) TestCase |
noteTestStartedI(Quality qual)
Notifies that an atomic test is started or ignored.
|
(package private) String |
openClassChooser()
Opens the class chooser dialog
and returns the choosen class or
null
if either no file was selected,
a file is selected which does not exist
or does not represent a java class file. |
(package private) void |
setCenter(Actions actions) |
(package private) void |
setMenuBar(Actions actions) |
(package private) void |
setStatus(String msg)
Sets the message
msg to the status bar. |
private void |
setStatus(TestCase testCase)
Sets a status message describing
testCase
to the status bar using setStatus(String). |
(package private) void |
testClassStructureLoaded(Description desc)
Notifies that the structure of the test class may have been updated.
|
(package private) void |
testRunAborted()
Notifies that a test has been aborted by the user.
|
(package private) void |
testRunFinished(long runTime)
Notifies that a test has been finished sufficiently or not.
|
(package private) void |
testRunStarted(Description desc)
Notifies that a test with structure given by
desc
is going to be run next. |
private void |
updateG() |
private static final ImageIcon LOGO_ICON
private static final ImageIcon HIERARCHY_ICON
private static final ImageIcon SMALL_LOGO_ICON
private static final Component HORIZ_BOUNDARY
private static final Component HORIZ_BOUNDARY2
private static final Component VERTI_BOUNDARY
private static final int HORIZ_FRAME
private static final int VERTI_FRAME
private static final String CHOOSE_CLASSPATH
private static final String SOURCEPATH
private final JFrame frame
GUIRunner.ClassChooser
and in updateG().private final GUIRunner.ClassChooser classChooser
private final JLabel className
private final GUIRunner.TestProgressBar progress
private final GUIRunner.StatisticsTestState statisticsTestState
private GUIRunner.TestCaseLister testCaseLister
private GUIRunner.HierarchyWrapper testHierarchy
private JSplitPane splitPane
testCaseLister
and another one for the testHierarchy.
The stack trace box is given by
GUIRunner.TestCaseLister.getStackTraceBox().
This field is used to reset to preferred size.
private final JLabel statusBar
GUIRunner(Actions actions)
GUIRunner instance
which defines components with unloaded test class.
Loading is done
by invoking testClassStructureLoaded(Description).String openClassChooser()
null
if either no file was selected,
a file is selected which does not exist
or does not represent a java class file.
Essentially delegates
to GUIRunner.ClassChooser.getChosenClass().
final void setMenuBar(Actions actions)
final void setCenter(Actions actions)
private void updateG()
void setStatus(String msg)
msg to the status bar.private void setStatus(TestCase testCase)
testCase
to the status bar using setStatus(String).TestCase noteTestStartedI(Quality qual)
qual - the quality of the testcase:
This is either Quality.Started or Quality.Ignored.void noteReportResult(TestCase testCase)
testCase is finished,
whether successful or not or that a test is ignored
after invoking noteTestStartedI(Quality)
with parameter Quality.Ignored.testCase - The testcase comprising the result of the singular test finished.void testClassStructureLoaded(Description desc)
desc - a description of the test structure defined in the test class
which is a hierarchy of suites and singular tests.testRunStarted(Description)void testRunStarted(Description desc)
desc
is going to be run next.
Called before any tests have been run.
At least once before this one,
testClassStructureLoaded(Description) has been invoked.desc - describes the (hierarchy of) tests to be run.
This is a sub-hierarchy of the one given by the test class.void testRunFinished(long runTime)
runTime - the time execution of the test took in milliseconds.void testRunAborted()
Copyright © 2012–2018 Simuline Organization (l2r). All rights reserved.