Class TestCaseSummaryImpl
- java.lang.Object
-
- com.atlassian.bamboo.resultsummary.tests.TestCaseSummaryImpl
-
- All Implemented Interfaces:
TestCaseSummary
public class TestCaseSummaryImpl extends Object implements TestCaseSummary
-
-
Constructor Summary
Constructors Constructor Description TestCaseSummaryImpl(@NotNull TestCase testCase, @NotNull PlanKey planKey, @Nullable List<BuildResultsSummary> filteredBuildResults, TestsManager testsManager, ResultsSummaryManager resultsSummaryManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getAverageElapsedBuilds()
Calculates the average number of builds between fixes.long
getAverageElapsedTime()
Returns the averag etime in milliseconds it takes for builds to be fixedint
getCountFailingSince()
BuildResultsSummary
getFailingSinceBuild()
@Nullable String
getFailingSinceBuildKey()
Just returns the key of the failing since build, just in case the buildResult doesn't exist anymore, e.g.@NotNull List<FailurePeriod>
getFailurePeriods()
@Nullable BuildResultsSummary
getLastRanBuild()
@Nullable TestCaseResult
getLastTestCaseResult()
PlanKey
getPlanKey()
@Nullable BuildResultsSummary
getSucceedingSinceBuild()
-
-
-
Constructor Detail
-
TestCaseSummaryImpl
public TestCaseSummaryImpl(@NotNull @NotNull TestCase testCase, @NotNull @NotNull PlanKey planKey, @Nullable @Nullable List<BuildResultsSummary> filteredBuildResults, TestsManager testsManager, ResultsSummaryManager resultsSummaryManager)
-
-
Method Detail
-
getLastTestCaseResult
@Nullable public @Nullable TestCaseResult getLastTestCaseResult()
- Specified by:
getLastTestCaseResult
in interfaceTestCaseSummary
- Returns:
- the last TestCaseResult to occur if stored in the database. Null if last test case run was successful.
-
getLastRanBuild
@Nullable public @Nullable BuildResultsSummary getLastRanBuild()
- Specified by:
getLastRanBuild
in interfaceTestCaseSummary
- Returns:
- the buildResultSummary that this test last ran in (if it exists)
-
getFailingSinceBuild
public BuildResultsSummary getFailingSinceBuild()
- Specified by:
getFailingSinceBuild
in interfaceTestCaseSummary
- Returns:
- If the test is currently failing, the BuildResultsSummary the test broke in otherwise null. Build returned should have failed.
-
getFailingSinceBuildKey
@Nullable public @Nullable 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 interfaceTestCaseSummary
- Returns:
- String key for the failing since build
-
getCountFailingSince
public int getCountFailingSince()
- Specified by:
getCountFailingSince
in interfaceTestCaseSummary
- Returns:
- If the test is currently failing, how many builds has it been failing for. otherwise 0;
-
getSucceedingSinceBuild
@Nullable public @Nullable BuildResultsSummary getSucceedingSinceBuild()
- Specified by:
getSucceedingSinceBuild
in interfaceTestCaseSummary
- 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 @NotNull List<FailurePeriod> getFailurePeriods()
- Specified by:
getFailurePeriods
in interfaceTestCaseSummary
- 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 interfaceTestCaseSummary
- Returns:
- time in milliseconds
-
getAverageElapsedBuilds
public float getAverageElapsedBuilds()
Calculates the average number of builds between fixes.- Specified by:
getAverageElapsedBuilds
in interfaceTestCaseSummary
- Returns:
- approximate number of builds elapsed before a fix
-
getPlanKey
public PlanKey getPlanKey()
-
-