Class TestFailureRateCollector
- java.lang.Object
-
- jetbrains.buildServer.serverSide.stat.TestFailureRateCollector
-
- All Implemented Interfaces:
AfterBuildsCleanupExtension
,ServerExtension
,TestFailuresStatistics
,TeamCityExtension
public class TestFailureRateCollector extends Object implements AfterBuildsCleanupExtension, TestFailuresStatistics
- Author:
- Pavel.Sher Date: 21.04.2008
-
-
Constructor Summary
Constructors Constructor Description TestFailureRateCollector(SQLRunnerEx sqlRunner, EventDispatcher<BuildServerListener> serverDispatcher, EventDispatcher<BuildTestsListener> testsDispatcher, ProjectManager projectManager, STestManager testManager, ServerResponsibility serverResponsibility, TimeService timeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterCleanup(CleanupProcessState cleanupState)
Invoked upon finishing of the main cleanup process.List<TestFailureRate>
getFailingTests(String buildTypeId, float failureRate)
Returns list ofTestFailureRate
objects of most frequently failing tests in the build configuration.boolean
isFailingTestsAvailable(String buildTypeId)
Returns true if failing tests statistics available for the specified build configuration.
-
-
-
Constructor Detail
-
TestFailureRateCollector
public TestFailureRateCollector(@NotNull SQLRunnerEx sqlRunner, @NotNull EventDispatcher<BuildServerListener> serverDispatcher, @NotNull EventDispatcher<BuildTestsListener> testsDispatcher, @NotNull ProjectManager projectManager, @NotNull STestManager testManager, ServerResponsibility serverResponsibility, @NotNull TimeService timeService)
-
-
Method Detail
-
getFailingTests
@NotNull public List<TestFailureRate> getFailingTests(@NotNull String buildTypeId, float failureRate)
Description copied from interface:TestFailuresStatistics
Returns list ofTestFailureRate
objects of most frequently failing tests in the build configuration.- Specified by:
getFailingTests
in interfaceTestFailuresStatistics
- Parameters:
buildTypeId
- build configuration idfailureRate
- low threshold of failure rate (should be less than 1.0)- Returns:
- list of failing tests with their failure rate. List is sorted by failure rate, higher rate corresponds to less index in the list.
-
isFailingTestsAvailable
public boolean isFailingTestsAvailable(@NotNull String buildTypeId)
Description copied from interface:TestFailuresStatistics
Returns true if failing tests statistics available for the specified build configuration.- Specified by:
isFailingTestsAvailable
in interfaceTestFailuresStatistics
- Parameters:
buildTypeId
- build configuration id- Returns:
- see above
-
afterCleanup
public void afterCleanup(@NotNull CleanupProcessState cleanupState)
Description copied from interface:AfterBuildsCleanupExtension
Invoked upon finishing of the main cleanup process. At this point all data for specific builds is deleted.
Note: This extension might not be called for every cleanup run as cleanup process can be interrupted earlier. Extension must check cleanup process state and if it is interrupted, complete its operations and return as quick as possible.- Specified by:
afterCleanup
in interfaceAfterBuildsCleanupExtension
- Parameters:
cleanupState
- cleanup process state
-
-