Class GUIRunner

    • Field Detail

      • LOGO_ICON

        private static final javax.swing.ImageIcon LOGO_ICON
        The (big) JUnit-logo.
      • HIERARCHY_ICON

        private static final javax.swing.ImageIcon HIERARCHY_ICON
        The icon representing the hierarchy of tests: used for the tabbed pane.
      • SMALL_LOGO_ICON

        private static final javax.swing.ImageIcon SMALL_LOGO_ICON
        The small JUnit-logo on top left of this frame. **** still this is not displayed properly ****.
      • HORIZ_BOUNDARY

        private static final java.awt.Component HORIZ_BOUNDARY
        Represents the horizontal space used for the boundary.
      • HORIZ_BOUNDARY2

        private static final java.awt.Component HORIZ_BOUNDARY2
        Represents double of the horizontal space used for the boundary.
      • VERTI_BOUNDARY

        private static final java.awt.Component VERTI_BOUNDARY
        Represents the vertical space used for the boundary.
      • HORIZ_FRAME

        private static final int HORIZ_FRAME
        The horizontal size of the frame.
        See Also:
        Constant Field Values
      • VERTI_FRAME

        private static final int VERTI_FRAME
        The vertical size of the frame.
        See Also:
        Constant Field Values
      • CHOOSE_CLASSPATH

        private static final java.lang.String CHOOSE_CLASSPATH
        The name of the system property the value of which points to the directory which is opened by the file chooser. This is the directory containing the test classes.
        See Also:
        Constant Field Values
      • SOURCEPATH

        private static final java.lang.String SOURCEPATH
        The name of the system property the value of which is the source path. This comprises the product sources (in maven called main sources) and the test sources. This is used to edit sources at places throwing an exception.
        See Also:
        Constant Field Values
      • frame

        private final javax.swing.JFrame frame
        The frame in which the Testrunne GUI is displayed. Since this is the outermost component, this is used in GUIRunner.ClassChooser and in updateG().
      • className

        private final javax.swing.JLabel className
        Contains the fully qualified name of the testclasse currently under consideration.
      • progress

        private final GUIRunner.TestProgressBar progress
        The progress bar indicating how much of the testcases already passed.
      • statisticsTestState

        private final 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.
      • testCaseLister

        private GUIRunner.TestCaseLister testCaseLister
        Represents the list of testcases already failed. This is shown in one of the tabs.
      • testHierarchy

        private GUIRunner.HierarchyWrapper testHierarchy
        Represents the hierarchy of testcases. This is shown in one of the tabs.
      • splitPane

        private javax.swing.JSplitPane splitPane
        Represents the split pane with a tabbed pane as top component and the stack trace box as bottom component. The tabbed pane contains a tab for the 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.

      • statusBar

        private final javax.swing.JLabel statusBar
        Contains a status message.
    • Method Detail

      • openClassChooser

        java.lang.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.

        Essentially delegates to GUIRunner.ClassChooser.getChosenClass().

      • setMenuBar

        final void setMenuBar​(Actions actions)
      • setCenter

        final void setCenter​(Actions actions)
      • updateG

        private void updateG()
      • setStatus

        void setStatus​(java.lang.String msg)
        Sets the message msg to the status bar.
      • setStatus

        private void setStatus​(TestCase testCase)
        Sets a status message describing testCase to the status bar using setStatus(String).
      • noteReportResult

        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.
        Parameters:
        testCase - The testcase comprising the result of the singular test finished.
      • testClassStructureLoaded

        void testClassStructureLoaded​(Description desc)
        Notifies that the structure of the test class may have been updated.
        Parameters:
        desc - a description of the test structure defined in the test class which is a hierarchy of suites and singular tests.
        See Also:
        testRunStarted(Description)
      • testRunStarted

        void testRunStarted​(Description desc)
        Notifies that a test with structure given by 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.
        Parameters:
        desc - describes the (hierarchy of) tests to be run. This is a sub-hierarchy of the one given by the test class.
      • testRunFinished

        void testRunFinished​(long runTime)
        Notifies that a test has been finished sufficiently or not.
        Parameters:
        runTime - the time execution of the test took in milliseconds.
      • testRunAborted

        void testRunAborted()
        Notifies that a test has been aborted by the user.