com.atlassian.bamboo.build
Class DefaultTestManager

java.lang.Object
  extended by com.atlassian.bamboo.build.DefaultTestManager
All Implemented Interfaces:
TestManager

public class DefaultTestManager
extends java.lang.Object
implements TestManager


Field Summary
 
Fields inherited from interface com.atlassian.bamboo.build.TestManager
KEY_ALL_BUILDS, KEY_LAST_25_BUILDS, KEY_LAST_30_DAYS, KEY_LAST_7_DAYS, KEY_LAST_90_DAYS
 
Constructor Summary
DefaultTestManager(TestResultManager testResultManager)
           
 
Method Summary
 java.util.Map<java.lang.String,TestCase> getAllTestCases(Build build, TestCaseFilter filter)
          A Map all test cases which was ever historically present.
 BuildResultsSummaryManager getBuildResultsSummaryManager()
           
 java.util.List<TestCase> getLongestRunningTests(Build build, int number, TestCaseFilter filter)
           
 java.util.List<TestCase> getLongestTimeToFixTests(Build build, int number, TestCaseFilter filter)
           
 LuceneConnection getLuceneConnection()
           
 java.util.List<TestCase> getMostFailingTests(Build build, int number, TestCaseFilter filter)
          Get a list of the top X most failing test cases historically.
 int getTestBrokenIn(TestResults testResults, Build build, int minBuildNumber, int buildNumber)
          Returns the build number that the test has found to be first failing before the passed buildNumber
 TestCase getTestCase(Build build, java.lang.String key, TestCaseFilter filter)
          A Lucene based implementation of a TestCase
 TestCaseFilter getTestCaseFilter(java.lang.String key, Build build)
           
 TestResultManager getTestResultManager()
           
 void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
           
 void setLuceneConnection(LuceneConnection luceneConnection)
           
 void setTestResultManager(TestResultManager testResultManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTestManager

public DefaultTestManager(TestResultManager testResultManager)
Method Detail

getTestCaseFilter

public TestCaseFilter getTestCaseFilter(java.lang.String key,
                                        Build build)
Specified by:
getTestCaseFilter in interface TestManager

getTestCase

public TestCase getTestCase(Build build,
                            java.lang.String key,
                            TestCaseFilter filter)
A Lucene based implementation of a TestCase

Specified by:
getTestCase in interface TestManager
Parameters:
build -
key -
Returns:
TestCase object populated by index searches.

getAllTestCases

public java.util.Map<java.lang.String,TestCase> getAllTestCases(Build build,
                                                                TestCaseFilter filter)
                                                         throws java.io.IOException
Description copied from interface: TestManager
A Map all test cases which was ever historically present. Each test case is one with a unique test suite and method name. The Key of map is the test case, in the form of: a.c.X:testFoo

Specified by:
getAllTestCases in interface TestManager
Returns:
Map of test cases. Key is the key of the test case. the value is the actual TestCase object.
Throws:
java.io.IOException

getTestBrokenIn

public int getTestBrokenIn(TestResults testResults,
                           Build build,
                           int minBuildNumber,
                           int buildNumber)
                    throws java.io.IOException
Description copied from interface: TestManager
Returns the build number that the test has found to be first failing before the passed buildNumber

Specified by:
getTestBrokenIn in interface TestManager
Parameters:
testResults - - the test results to search for
build - - the build to be queried
minBuildNumber - - the minimum build number to search from. Inclusive
buildNumber - - the build number to search back from. Exclusive
Returns:
the build number where the test was first broken in. -1 if none can be found
Throws:
java.io.IOException

getMostFailingTests

public java.util.List<TestCase> getMostFailingTests(Build build,
                                                    int number,
                                                    TestCaseFilter filter)
                                             throws java.io.IOException
Description copied from interface: TestManager
Get a list of the top X most failing test cases historically.

Specified by:
getMostFailingTests in interface TestManager
number - - the top X number failing test cases
Returns:
List of TestCase objects representing this.
Throws:
java.io.IOException

getLongestRunningTests

public java.util.List<TestCase> getLongestRunningTests(Build build,
                                                       int number,
                                                       TestCaseFilter filter)
                                                throws java.io.IOException
Specified by:
getLongestRunningTests in interface TestManager
Throws:
java.io.IOException

getLongestTimeToFixTests

public java.util.List<TestCase> getLongestTimeToFixTests(Build build,
                                                         int number,
                                                         TestCaseFilter filter)
                                                  throws java.io.IOException
Specified by:
getLongestTimeToFixTests in interface TestManager
Throws:
java.io.IOException

getTestResultManager

public TestResultManager getTestResultManager()

setTestResultManager

public void setTestResultManager(TestResultManager testResultManager)

getLuceneConnection

public LuceneConnection getLuceneConnection()

setLuceneConnection

public void setLuceneConnection(LuceneConnection luceneConnection)

getBuildResultsSummaryManager

public BuildResultsSummaryManager getBuildResultsSummaryManager()

setBuildResultsSummaryManager

public void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.