com.atlassian.bamboo.resultsummary.tests
Class TestCaseSummaryImpl

java.lang.Object
  extended by com.atlassian.bamboo.resultsummary.tests.TestCaseSummaryImpl
All Implemented Interfaces:
TestCaseSummary

public class TestCaseSummaryImpl
extends java.lang.Object
implements TestCaseSummary


Constructor Summary
TestCaseSummaryImpl(TestCase testCase, Buildable build, java.util.List<BuildResultsSummary> filteredBuildResults, TestsManager testsManager, BuildResultsSummaryManager buildResultsSummaryManager)
           
 
Method Summary
 float getAverageElapsedBuilds()
          Calculates the average number of builds between fixes.
 long getAverageElapsedTime()
          Returns the averag etime in milliseconds it takes for builds to be fixed
 int getCountFailingSince()
           
 BuildResultsSummary getFailingSinceBuild()
           
 java.lang.String getFailingSinceBuildKey()
          Just returns the key of the failing since build, just in case the buildResult doesn't exist anymore, e.g.
 java.util.List<FailurePeriod> getFailurePeriods()
           
 BuildResultsSummary getLastRanBuild()
           
 TestCaseResult getLastTestCaseResult()
           
 BuildResultsSummary getSucceedingSinceBuild()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCaseSummaryImpl

public TestCaseSummaryImpl(@NotNull
                           TestCase testCase,
                           @NotNull
                           Buildable build,
                           @Nullable
                           java.util.List<BuildResultsSummary> filteredBuildResults,
                           TestsManager testsManager,
                           BuildResultsSummaryManager buildResultsSummaryManager)
Method Detail

getLastTestCaseResult

@Nullable
public TestCaseResult getLastTestCaseResult()
Specified by:
getLastTestCaseResult in interface TestCaseSummary
Returns:
the last TestCaseResult to occur if stored in the database. Null if last test case run was successful.

getLastRanBuild

@Nullable
public BuildResultsSummary getLastRanBuild()
Specified by:
getLastRanBuild in interface TestCaseSummary
Returns:
the buildResultSummary that this test last ran in (if it exists)

getFailingSinceBuild

public BuildResultsSummary getFailingSinceBuild()
Specified by:
getFailingSinceBuild in interface TestCaseSummary
Returns:
If the test is currently failing, the BuildResultsSummary the test broke in otherwise null. Build returned should have failed.

getFailingSinceBuildKey

@Nullable
public java.lang.String getFailingSinceBuildKey()
Description copied from interface: TestCaseSummary
Just returns the key of the failing since build, just in case the buildResult doesn't exist anymore, e.g. if it was deleted.

Specified by:
getFailingSinceBuildKey in interface TestCaseSummary
Returns:
String key for the failing since build

getCountFailingSince

public int getCountFailingSince()
Specified by:
getCountFailingSince in interface TestCaseSummary
Returns:
If the test is currently failing, how many builds has it been failing for. otherwise 0;

getSucceedingSinceBuild

@Nullable
public BuildResultsSummary getSucceedingSinceBuild()
Specified by:
getSucceedingSinceBuild in interface TestCaseSummary
Returns:
if the test is currently passing, which is the build that the test was most recently fixed in . If the test is failing, returns null. Build returned should have been successful.

getFailurePeriods

@NotNull
public java.util.List<FailurePeriod> getFailurePeriods()
Specified by:
getFailurePeriods in interface TestCaseSummary
Returns:
a list of all the failure periods that occurred within this filter period

getAverageElapsedTime

public long getAverageElapsedTime()
Returns the averag etime in milliseconds it takes for builds to be fixed

Specified by:
getAverageElapsedTime in interface TestCaseSummary
Returns:
time in milliseconds

getAverageElapsedBuilds

public float getAverageElapsedBuilds()
Calculates the average number of builds between fixes.

Specified by:
getAverageElapsedBuilds in interface TestCaseSummary
Returns:
approximate number of builds elapsed before a fix


Copyright © 2011 Atlassian. All Rights Reserved.