Class MockBuildStatistics

    • Constructor Detail

      • MockBuildStatistics

        public MockBuildStatistics()
    • Method Detail

      • isEmpty1

        public boolean isEmpty1()
        Description copied from interface: ShortStatistics
        This method has so strange name because "empty" is predefined keyword in JSP EL.
        Specified by:
        isEmpty1 in interface ShortStatistics
        Returns:
        true if build doesn't have any tests and has no compilation errors
      • getPreviousFailedTestsCount

        public int getPreviousFailedTestsCount()
        Specified by:
        getPreviousFailedTestsCount in interface BuildStatistics
        Returns:
        number of tests which fail in this build and in the previous build as well
      • getCompilationErrorsCount

        public int getCompilationErrorsCount()
        Specified by:
        getCompilationErrorsCount in interface ShortStatistics
        Returns:
        number of detected compilation errors within compilation blocks.
      • getTotalDuration

        public long getTotalDuration()
        Specified by:
        getTotalDuration in interface ShortStatistics
        Returns:
        total duration of test execution, i.e. sum of all test durations (msecs). Depending on test runner, may either include or exclude time for test setup/teardown times
      • getPassedTestCount

        public int getPassedTestCount()
        Specified by:
        getPassedTestCount in interface ShortStatistics
        Returns:
        number of passed(successful) tests in the build.
      • getNewFailedCount

        public int getNewFailedCount()
        Specified by:
        getNewFailedCount in interface ShortStatistics
        Returns:
        number of newly failed tests in the build, i.e. number of tests which fail in this build the first time comparing with recent builds.
      • getAllTestRunCount

        public int getAllTestRunCount()
        Specified by:
        getAllTestRunCount in interface BuildStatistics
        Returns:
        Total number of test runs in the build. If a test was run several times withing the build, all its runs will be considered.
      • getTests

        public List<STestRun> getTests​(@Nullable
                                       Status status,
                                       @NotNull
                                       BuildStatistics.Order order)
        Specified by:
        getTests in interface BuildStatistics
        Parameters:
        status - if specified, this is the status of tests to be returned. Supported values are NORMAL, FAILURE, UNKNOWN.
        order - specifies result order
        Returns:
        Non-modifiable list of tests according to the parameters query (passed and ignored tests are returned only if statistics were created with corresponding BuildStatisticsOptions)
      • getAllTests

        public List<STestRun> getAllTests()
        Specified by:
        getAllTests in interface BuildStatistics
        Returns:
        all build tests in natural order (passed and ignored tests are returned only if statistics were created with corresponding BuildStatisticsOptions)
      • getFailedTestCount

        public int getFailedTestCount()
        Specified by:
        getFailedTestCount in interface ShortStatistics
        Returns:
        number of failed or error tests in the build
      • getAllTestCount

        public int getAllTestCount()
        Specified by:
        getAllTestCount in interface ShortStatistics
        Returns:
        total number of tests, including ignored, passed, and failed
      • getFailedTests

        public List<STestRun> getFailedTests()
        Specified by:
        getFailedTests in interface ShortStatistics
        Returns:
        Collection of failed tests in the build, ordered by isNew, orderNumber (excluding muted runs)
      • findTestsBy

        public List<STestRun> findTestsBy​(TestName testName)
        Specified by:
        findTestsBy in interface BuildStatistics
        Returns:
        collection of test runs by a testName (test with the same name can run several times in the build)
      • getSignature

        public int getSignature()
        Specified by:
        getSignature in interface ShortStatistics
        Returns:
        a signature of the build. We consider two builds fail the same way if they have the same signature.