|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.bamboo.resultsummary.tests.TestsManagerImpl
public class TestsManagerImpl
| Constructor Summary | |
|---|---|
TestsManagerImpl(TestsDao testsDao,
TestResultsDao testResultsDao,
PlanManager planManager,
BuildResultsSummaryManager buildResultsSummaryManager)
|
|
| Method Summary | |
|---|---|
void |
copyTestResultsToBuildResultsSummary(BuildResultsSummary summary,
BuildResults buildResults,
BuildContext buildContext)
Converts the test results sent back from the agent to a list of TestClassResults and attaches them to the BRS. |
void |
copyTestResultsToBuildResultsSummary(Plan plan,
BuildResultsSummary summary,
java.util.List<TestResults> oldTests)
Converts a set of test results to a list of TestClassResults and attaches them to the BRS. |
java.util.List<Pair<TestCaseResult,java.lang.Integer>> |
getLastNFailingResults(TestCase testCase,
int number)
Retrieve the last n failing testResults for this given test case, latest first. |
java.util.List<Pair<TestCaseResult,java.lang.Integer>> |
getLastNFailingResults(TestCase testCase,
java.util.List<BuildResultsSummary> buildResults,
int number)
Retrieve the last n failing testResults for this given test case, but only those that occurred within the provided build results. |
java.util.List<TestCase> |
getLongestRunningTestCases(Plan plan)
Provide a list of the top ten longest running tests for a plan, based on the duration of the TestCase's TestCaseResults Finds top 10 results in order (longest first) |
java.util.List<Pair<TestCase,java.lang.Float>> |
getLongestToFixTestCases(java.util.List<BuildResultsSummary> buildResults)
Retrieve a list of the test cases that have taken the longest amount of time to fix. |
java.util.List<Pair<TestCase,java.lang.Float>> |
getLongestToFixTestCases(Plan plan)
Retrieve a list of the test cases that have taken the longest amount of time to fix. |
java.util.List<Pair<TestCase,java.lang.Integer>> |
getMostFailingTestCases(java.util.List<BuildResultsSummary> buildResults)
Provide a list of the top 10 most failing test cases for a plan. |
java.util.List<Pair<TestCase,java.lang.Integer>> |
getMostFailingTestCases(Plan plan)
Provide a list of the top 10 most failing test cases for a plan. |
protected java.util.Map<TestCase,TestCaseResult> |
getPreviousFailures(BuildResultsSummary buildResultsSummary)
|
java.util.List<TestCaseResultStatisticsProvider> |
getResultStatistics(TestCase testCase)
Returns a list of wrapped TestCaseResult and BuildResultSummary for a particular test case, for use by e.g. |
java.util.List<TestCaseResultStatisticsProvider> |
getResultStatistics(TestCase testCase,
java.util.List<BuildResultsSummary> buildResults)
Returns a list of wrapped TestCaseResult and BuildResultSummary for a particular test case and contained within a specific span of build result summaries. |
BuildResultsSummary |
getSucceedingSinceBuildResultSummary(TestCase testCase)
Find the build in which the given test has been successful since. |
TestCase |
getTestCaseById(long testCaseId)
Find a specific testCase by id |
TestCaseResult |
getTestCaseResult(TestCase testCase,
long buildNumber)
Find a specific run of a testCase |
TestCaseResult |
getTestCaseResultById(long testCaseId)
Find a specific testCaseResult by id |
TestClass |
getTestClassById(long testClassId)
Find a specific testClass by id |
TestClassResult |
getTestClassResultById(long testClassResultId)
Find a specific testClassResult by id |
java.util.List<TestClassResult> |
getTestClassResults(PlanResultKey planResultKey)
Retrieves a list of all testClassResults for a BuildResultSummary |
com.google.common.collect.TreeMultimap<TestClassResult,TestCaseResult> |
getTestOrderedMap(java.util.List<TestCaseResult> tests)
Generate a ListOrderedMap of TestClassResult to List |
java.util.List<TestCaseResult> |
getTestsForBuildResultByDeltaState(BuildResultsSummary summary,
TestDeltaState deltaState,
int firstResult,
int maxCount)
Retrieves a list of testCaseResults for a BuildResultSummary based on their delta state (e.g BROKEN, FIXED) |
java.util.List<TestCaseResult> |
getTestsForBuildResultByState(BuildResultsSummary summary,
TestState state)
Retrieves a list of testCaseResults for a BuildResultSummary based on their state (e.f FAILED or SUCCESS) |
java.util.List<TestCaseResult> |
getTestsForBuildResultByState(BuildResultsSummary summary,
TestState state,
int firstResult,
int maxCount)
Retrieves a list of testCaseResults for a BuildResultSummary based on their state (e.f FAILED or SUCCESS). |
java.util.List<TestCaseResult> |
getTestsForChainResultByDeltaState(ChainResultsSummary summary,
TestDeltaState deltaState,
int firstResult,
int maxCount)
Retrieves a list of testCaseResults for a ChainResultSummary based on their delta state (e.g BROKEN, FIXED) |
java.util.List<TestCaseResult> |
getTestsForChainResultByDeltaStates(ChainResultsSummary summary,
TestDeltaState[] deltaStates,
int firstResult,
int maxCount)
Retrieves a list of testCaseResults for a ChainResultSummary based on their delta state (e.g BROKEN, FIXED) |
java.util.List<TestCaseResult> |
getTestsForChainResultByState(ChainResultsSummary summary,
TestState testState,
int firstResult,
int maxCount)
Retrieves a list of testCaseResults for a ChainResultSummary based on their TestState |
int |
removeResultsByPlan(Plan plan)
Remove all TestClassResult objects referenced by ResultsSummary objects identified by planKey |
void |
repopulateTestResultsInBuildResultsSummary(Plan plan,
BuildResultsSummary summary,
java.util.List<TestResults> successfulTests)
|
void |
saveTestCase(TestCase testCase)
Save an individual TestCase to the database |
void |
saveTestClass(TestClass testClass)
Save a TestClass (and included TestCases) to the database |
protected void |
updateTestCaseResultDeltaInformation(BuildResultsSummary summary,
TestCaseResult testResult,
java.util.Map<TestCase,TestCaseResult> previousFailures)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TestsManagerImpl(TestsDao testsDao,
TestResultsDao testResultsDao,
PlanManager planManager,
BuildResultsSummaryManager buildResultsSummaryManager)
| Method Detail |
|---|
public void saveTestClass(TestClass testClass)
TestsManager
saveTestClass in interface TestsManagertestClass - to savepublic void saveTestCase(TestCase testCase)
TestsManager
saveTestCase in interface TestsManagertestCase - to savepublic TestCaseResult getTestCaseResultById(long testCaseId)
TestsManager
getTestCaseResultById in interface TestsManagertestCaseId - of the test you want to find
public TestClassResult getTestClassResultById(long testClassResultId)
TestsManager
getTestClassResultById in interface TestsManagertestClassResultId - of the test you want to find
@Nullable public TestClass getTestClassById(long testClassId)
TestsManager
getTestClassById in interface TestsManagertestClassId - of the test class you want to find
@Nullable public TestCase getTestCaseById(long testCaseId)
TestsManager
getTestCaseById in interface TestsManagertestCaseId - of the test case you want to find
@NotNull
public java.util.List<TestCaseResult> getTestsForBuildResultByState(BuildResultsSummary summary,
TestState state)
TestsManager
getTestsForBuildResultByState in interface TestsManagersummary - the BuildResultsSummary to get the tests forstate - - The TestState to search for.
@NotNull
public java.util.List<TestCaseResult> getTestsForBuildResultByState(BuildResultsSummary summary,
TestState state,
int firstResult,
int maxCount)
TestsManager
getTestsForBuildResultByState in interface TestsManagersummary - the BuildResultsSummary to get the tests forstate - - The TestState to search for.firstResult - - index of the first resultmaxCount - - maximum amount of records returned
@NotNull
public java.util.List<TestCaseResult> getTestsForBuildResultByDeltaState(BuildResultsSummary summary,
TestDeltaState deltaState,
int firstResult,
int maxCount)
TestsManager
getTestsForBuildResultByDeltaState in interface TestsManagersummary - the BuildResultsSummary to get the tests fordeltaState - - The TestDeltaState to search for.firstResult - - index of the first resultmaxCount - - maximum amount of records returned
public java.util.List<TestCaseResult> getTestsForChainResultByDeltaState(ChainResultsSummary summary,
TestDeltaState deltaState,
int firstResult,
int maxCount)
TestsManager
getTestsForChainResultByDeltaState in interface TestsManagerfirstResult - - index of the first resultmaxCount - - maximum amount of records returned
@NotNull
public java.util.List<TestCaseResult> getTestsForChainResultByDeltaStates(@NotNull
ChainResultsSummary summary,
@NotNull
TestDeltaState[] deltaStates,
int firstResult,
int maxCount)
TestsManager
getTestsForChainResultByDeltaStates in interface TestsManagerfirstResult - - index of the first resultmaxCount - - maximum amount of records returned
@NotNull
public java.util.List<TestCaseResult> getTestsForChainResultByState(@NotNull
ChainResultsSummary summary,
@NotNull
TestState testState,
int firstResult,
int maxCount)
TestsManagerTestState
getTestsForChainResultByState in interface TestsManager
@NotNull
public java.util.List<TestCaseResultStatisticsProvider> getResultStatistics(@NotNull
TestCase testCase)
TestsManager
getResultStatistics in interface TestsManagertestCase - to find the results for
@NotNull
public java.util.List<TestCaseResultStatisticsProvider> getResultStatistics(@NotNull
TestCase testCase,
@NotNull
java.util.List<BuildResultsSummary> buildResults)
TestsManager
getResultStatistics in interface TestsManagertestCase - to find the results forbuildResults - to contain search to (this list must not be empty)
@NotNull
public java.util.List<Pair<TestCaseResult,java.lang.Integer>> getLastNFailingResults(@NotNull
TestCase testCase,
int number)
TestsManager
getLastNFailingResults in interface TestsManagertestCase - to look for the results for.number - of results to retrieve
@NotNull
public java.util.List<Pair<TestCaseResult,java.lang.Integer>> getLastNFailingResults(@NotNull
TestCase testCase,
@NotNull
java.util.List<BuildResultsSummary> buildResults,
int number)
TestsManager
getLastNFailingResults in interface TestsManagertestCase - to look for the results for.buildResults - to search in for the tests.number - of results to retrieve
@NotNull
public java.util.List<TestCase> getLongestRunningTestCases(@NotNull
Plan plan)
TestsManager
getLongestRunningTestCases in interface TestsManagerplan - to search in for the tests.
@NotNull
public java.util.List<Pair<TestCase,java.lang.Integer>> getMostFailingTestCases(@NotNull
Plan plan)
TestsManager
getMostFailingTestCases in interface TestsManagerplan - to search for the tests
@NotNull
public java.util.List<Pair<TestCase,java.lang.Integer>> getMostFailingTestCases(@NotNull
java.util.List<BuildResultsSummary> buildResults)
TestsManager
getMostFailingTestCases in interface TestsManagerbuildResults - to search in for the tests.
@NotNull
public java.util.List<Pair<TestCase,java.lang.Float>> getLongestToFixTestCases(@NotNull
Plan plan)
TestsManager
getLongestToFixTestCases in interface TestsManagerplan - to search for results in
@NotNull
public java.util.List<Pair<TestCase,java.lang.Float>> getLongestToFixTestCases(@NotNull
java.util.List<BuildResultsSummary> buildResults)
TestsManager
getLongestToFixTestCases in interface TestsManagerbuildResults - to search in for the tests.
@Nullable
public TestCaseResult getTestCaseResult(TestCase testCase,
long buildNumber)
TestsManager
getTestCaseResult in interface TestsManagertestCase - to look forbuildNumber - of the build the run should have occured in
@Nullable public BuildResultsSummary getSucceedingSinceBuildResultSummary(TestCase testCase)
TestsManager
getSucceedingSinceBuildResultSummary in interface TestsManagertestCase - to search history for.
public int removeResultsByPlan(@NotNull
Plan plan)
TestsManagerTestClassResult objects referenced by ResultsSummary objects identified by planKey
removeResultsByPlan in interface TestsManagerplan - plan
@NotNull
public com.google.common.collect.TreeMultimap<TestClassResult,TestCaseResult> getTestOrderedMap(@NotNull
java.util.List<TestCaseResult> tests)
TestsManager
getTestOrderedMap in interface TestsManagertests - to put in the map
public void copyTestResultsToBuildResultsSummary(@NotNull
BuildResultsSummary summary,
@NotNull
BuildResults buildResults,
@NotNull
BuildContext buildContext)
TestsManager
copyTestResultsToBuildResultsSummary in interface TestsManagersummary - for the interesting tests to be attached to.buildResults - for the boring tests to be attached tobuildContext - for the build that has the tests we want to move
@NotNull
public java.util.List<TestClassResult> getTestClassResults(@NotNull
PlanResultKey planResultKey)
TestsManager
getTestClassResults in interface TestsManagerplanResultKey - key of the BuildResultsSummary to get the tests class results for
public void copyTestResultsToBuildResultsSummary(@NotNull
Plan plan,
@NotNull
BuildResultsSummary summary,
@NotNull
java.util.List<TestResults> oldTests)
TestsManager
copyTestResultsToBuildResultsSummary in interface TestsManagerplan - the tests are run againstsummary - for the tests to be attached to.oldTests - the set of tests to convert.
public void repopulateTestResultsInBuildResultsSummary(@NotNull
Plan plan,
@NotNull
BuildResultsSummary summary,
@NotNull
java.util.List<TestResults> successfulTests)
repopulateTestResultsInBuildResultsSummary in interface TestsManager
protected void updateTestCaseResultDeltaInformation(@NotNull
BuildResultsSummary summary,
@NotNull
TestCaseResult testResult,
@NotNull
java.util.Map<TestCase,TestCaseResult> previousFailures)
@NotNull
protected java.util.Map<TestCase,TestCaseResult> getPreviousFailures(@NotNull
BuildResultsSummary buildResultsSummary)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||