Class GUIRunner.StatisticsTestState

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable
    Enclosing class:
    GUIRunner

    static class GUIRunner.StatisticsTestState
    extends JComponent
    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.

    The numbers numRunsDone, numRuns and qual2num represent the number of runs done, the overall number of runs, done or not, and the number of finished tests of the according quality.

    • Field Detail

      • qual2label

        private final Map<Quality,​JLabel> qual2label
        Maps the quality with level > 0 to the according labels.
      • qual2num

        private final Map<Quality,​Integer> qual2num
        Maps the quality with any level to the number of testcases already finished or ignored with according state.
      • numRunsDone

        private int numRunsDone
        The number of runs already finished.
      • numRuns

        private int numRuns
        The overall number of runs, to be done, in execution or not yet started. The constructor initializes this with 0.
    • Constructor Detail

      • StatisticsTestState

        StatisticsTestState()
    • Method Detail

      • getBox

        Box getBox()
        Returns a horizontal box with the labels in qual2label intermangled with according icons.
      • initClassStructure

        void initClassStructure​(Description desc)
        Notifies that the structure of the test class may have been updated.

        Initiates

        and updates the labels runs and those in qual2label.
        Parameters:
        desc - a description of the test structure defined in the test class which is a hierarchy of suites and singular tests.
      • startTestRun

        void startTestRun​(TestCase testCase)
        Notifies that a test with structure given by desc is going to be run next.

        Initiates

        and updates the labels runs and those in qual2label.
        Parameters:
        testCase - describes the (hierarchy of) tests defined by the test class. Those which are in phase Quality.Scheduled are to be run.
      • detQual2NumRec

        private void detQual2NumRec​(TestCase testCase)
        Initializes teh statistics in qual2num according to testCase.
        Parameters:
        testCase - describes the (hierarchy of) tests defined by the test class. Those which are in phase Quality.Scheduled are to be run.
      • noteReportResult

        void noteReportResult​(TestCase testCase)
        Notifies that the singular test testCase is finished.

        Updates all counters and labels according to testCase's quality: It may succeed, be ignored, had a failure or could not be executed due to an exception or an error.

        Parameters:
        testCase - The testcase comprising the result of the singular test finished.
        See Also:
        TestCase.getQuality()