public interface TestsManager
Modifier and Type | Method and Description |
---|---|
void |
copyTestResultsToBuildResultsSummary(@NotNull BuildResultsSummary summary,
@NotNull BuildResults buildResults,
@NotNull BuildContext buildContext)
Converts the test results sent back from the agent to a list of TestClassResults and attaches them to the BRS.
|
@NotNull List<Pair<TestCaseResult,Integer>> |
getLastNFailingResults(@NotNull TestCase testCase,
int number)
Retrieve the last n failing testResults for this given test case, latest first.
|
@NotNull List<Pair<TestCaseResult,Integer>> |
getLastNFailingResults(@NotNull TestCase testCase,
@NotNull 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.
|
@NotNull List<TestCase> |
getLongestRunningTestCases(@NotNull ImmutablePlan 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)
|
@NotNull List<Pair<TestCase,Float>> |
getLongestToFixTestCases(@NotNull ImmutablePlan plan)
Retrieve a list of the test cases that have taken the longest amount of time to fix.
|
@NotNull List<Pair<TestCase,Float>> |
getLongestToFixTestCases(@NotNull List<BuildResultsSummary> buildResults)
Retrieve a list of the test cases that have taken the longest amount of time to fix.
|
@NotNull List<Pair<TestCase,Long>> |
getMostFailingTestCases(@NotNull ImmutablePlan plan)
Provide a list of the top 10 most failing test cases for a plan.
|
@NotNull List<Pair<TestCase,Long>> |
getMostFailingTestCases(@NotNull List<BuildResultsSummary> buildResults)
Provide a list of the top 10 most failing test cases for a plan.
|
@NotNull List<TestCaseResultStatisticsProvider> |
getResultStatistics(@NotNull TestCase testCase)
Returns a list of wrapped TestCaseResult and BuildResultSummary for a particular test case, for use by e.g.
|
@NotNull List<TestCaseResultStatisticsProvider> |
getResultStatistics(@NotNull TestCase testCase,
@NotNull 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.
|
@Nullable BuildResultsSummary |
getSucceedingSinceBuildResultSummary(TestCase testCase)
Find the build in which the given test has been successful since.
|
@Nullable TestCase |
getTestCaseById(long testCaseId)
Find a specific testCase by id
|
@Nullable TestCaseResult |
getTestCaseResultById(long testCaseResultId)
Find a specific testCaseResult by id
|
@NotNull List<TestCaseResult> |
getTestCaseResults(TestCase testCase,
long buildNumber)
Find a specific run of a testCase
|
@Nullable TestClass |
getTestClassById(long testClassId)
Find a specific testClass by id
|
@Nullable TestClassResult |
getTestClassResultById(long testClassResultId)
Find a specific testClassResult by id
|
@NotNull List<TestClassResult> |
getTestClassResults(@NotNull PlanResultKey planResultKey)
Retrieves a list of all testClassResults for a BuildResultSummary
|
@NotNull com.google.common.collect.TreeMultimap<TestClassResult,TestCaseResult> |
getTestOrderedMap(@NotNull List<TestCaseResult> tests)
Generate a ListOrderedMap of TestClassResult to list of
TestCaseResult based on a given list of TestCaseResults. |
@NotNull 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)
|
@NotNull List<TestCaseResult> |
getTestsForBuildResultByState(BuildResultsSummary summary,
TestState state)
Retrieves a list of testCaseResults for a BuildResultSummary based on their state (e.f FAILED or SUCCESS)
|
@NotNull 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).
|
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)
|
@NotNull List<TestCaseResult> |
getTestsForChainResultByDeltaStates(@NotNull ChainResultsSummary summary,
@NotNull TestDeltaState[] deltaStates,
int firstResult,
int maxCount)
Retrieves a list of testCaseResults for a ChainResultSummary based on their delta state (e.g BROKEN, FIXED)
|
@NotNull List<TestCaseResult> |
getTestsForChainResultByState(@NotNull ChainResultsSummary summary,
@NotNull TestState testState,
int firstResult,
int maxCount)
Retrieves a list of testCaseResults for a ChainResultSummary based on their
TestState |
List<Pair<TestCase,Long>> |
getTopBrokenTests(@NotNull PlanKey planKey,
BuildResultsFilter filter)
Returns a pai of the top 10 tests that's broken + the count for a given filter period
|
int |
removeResultsByPlan(@NotNull Plan plan)
Deprecated.
since 6.5
|
int |
removeResultsByPlan(PlanKey planKey)
Remove all
TestClassResult objects referenced by ResultsSummary objects identified by planKey |
void |
repopulateTestResultsInBuildResultsSummary(@NotNull BuildResultsSummary summary,
@NotNull List<TestResults> successfulTests)
Deprecated.
since 8.2 use
#repopulateTestResultsInBuildResultsSummary(BuildResultsSummary, Supplier |
void |
repopulateTestResultsInBuildResultsSummary(@NotNull BuildResultsSummary summary,
@NotNull Supplier<List<TestResults>> buildResultsSupplier) |
void |
saveTestCase(TestCase testCase)
Save an individual TestCase to the database
|
void |
saveTestClass(TestClass testClass)
Save a TestClass (and included TestCases) to the database
|
void saveTestClass(TestClass testClass)
testClass
- to savevoid saveTestCase(TestCase testCase)
testCase
- to savevoid copyTestResultsToBuildResultsSummary(@NotNull @NotNull BuildResultsSummary summary, @NotNull @NotNull BuildResults buildResults, @NotNull @NotNull BuildContext buildContext)
summary
- 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@Deprecated void repopulateTestResultsInBuildResultsSummary(@NotNull @NotNull BuildResultsSummary summary, @NotNull @NotNull List<TestResults> successfulTests)
#repopulateTestResultsInBuildResultsSummary(BuildResultsSummary, Supplier>)
void repopulateTestResultsInBuildResultsSummary(@NotNull @NotNull BuildResultsSummary summary, @NotNull @NotNull Supplier<List<TestResults>> buildResultsSupplier)
@NotNull @NotNull List<TestCaseResult> getTestsForBuildResultByState(BuildResultsSummary summary, TestState state)
summary
- the BuildResultsSummary to get the tests forstate
- - The TestState to search for.@NotNull @NotNull List<TestCaseResult> getTestsForBuildResultByState(BuildResultsSummary summary, TestState state, int firstResult, int maxCount)
summary
- the BuildResultsSummary to get the tests forstate
- - The TestState to search for.firstResult
- - index of the first resultmaxCount
- - maximum amount of records returned@NotNull @NotNull List<TestCaseResult> getTestsForBuildResultByDeltaState(BuildResultsSummary summary, TestDeltaState deltaState, int firstResult, int maxCount)
summary
- the BuildResultsSummary to get the tests fordeltaState
- - The TestDeltaState to search for.firstResult
- - index of the first resultmaxCount
- - maximum amount of records returnedList<TestCaseResult> getTestsForChainResultByDeltaState(ChainResultsSummary summary, TestDeltaState deltaState, int firstResult, int maxCount)
summary
- deltaState
- firstResult
- - index of the first resultmaxCount
- - maximum amount of records returned@NotNull @NotNull List<TestCaseResult> getTestsForChainResultByDeltaStates(@NotNull @NotNull ChainResultsSummary summary, @NotNull @NotNull TestDeltaState[] deltaStates, int firstResult, int maxCount)
summary
- deltaStates
- firstResult
- - index of the first resultmaxCount
- - maximum amount of records returned@NotNull @NotNull List<TestCaseResult> getTestsForChainResultByState(@NotNull @NotNull ChainResultsSummary summary, @NotNull @NotNull TestState testState, int firstResult, int maxCount)
TestState
summary
- testState
- firstResult
- maxCount
- @NotNull @NotNull com.google.common.collect.TreeMultimap<TestClassResult,TestCaseResult> getTestOrderedMap(@NotNull @NotNull List<TestCaseResult> tests)
TestCaseResult
based on a given list of TestCaseResults.tests
- to put in the mapTestCaseResult
@Nullable @Nullable TestCaseResult getTestCaseResultById(long testCaseResultId)
testCaseResultId
- of the test you want to find@Nullable @Nullable TestClassResult getTestClassResultById(long testClassResultId)
testClassResultId
- of the test you want to find@Nullable @Nullable TestCase getTestCaseById(long testCaseId)
testCaseId
- of the test case you want to find@Nullable @Nullable TestClass getTestClassById(long testClassId)
testClassId
- of the test class you want to find@NotNull @NotNull List<TestCaseResultStatisticsProvider> getResultStatistics(@NotNull @NotNull TestCase testCase)
testCase
- to find the results forTestCaseResultStatisticsProvider
for each TestCaseResult found for the TestCase@NotNull @NotNull List<TestCaseResultStatisticsProvider> getResultStatistics(@NotNull @NotNull TestCase testCase, @NotNull @NotNull List<BuildResultsSummary> buildResults)
testCase
- to find the results forbuildResults
- to contain search to (this list must not be empty)TestCaseResultStatisticsProvider
for each TestCaseResult found for the TestCase@NotNull @NotNull List<TestCase> getLongestRunningTestCases(@NotNull @NotNull ImmutablePlan plan)
plan
- to search in for the tests.@NotNull @NotNull List<Pair<TestCase,Long>> getMostFailingTestCases(@NotNull @NotNull ImmutablePlan plan)
plan
- to search for the tests@NotNull @NotNull List<Pair<TestCase,Long>> getMostFailingTestCases(@NotNull @NotNull List<BuildResultsSummary> buildResults)
buildResults
- to search in for the tests.@NotNull @NotNull List<Pair<TestCase,Float>> getLongestToFixTestCases(@NotNull @NotNull ImmutablePlan plan)
plan
- to search for results inList<Pair<TestCase,Long>> getTopBrokenTests(@NotNull @NotNull PlanKey planKey, BuildResultsFilter filter)
planKey
- filter
- @NotNull @NotNull List<Pair<TestCase,Float>> getLongestToFixTestCases(@NotNull @NotNull List<BuildResultsSummary> buildResults)
buildResults
- to search in for the tests.@NotNull @NotNull List<Pair<TestCaseResult,Integer>> getLastNFailingResults(@NotNull @NotNull TestCase testCase, int number)
testCase
- to look for the results for.number
- of results to retrieve@NotNull @NotNull List<Pair<TestCaseResult,Integer>> getLastNFailingResults(@NotNull @NotNull TestCase testCase, @NotNull @NotNull List<BuildResultsSummary> buildResults, int number)
testCase
- to look for the results for.buildResults
- to search in for the tests.number
- of results to retrieve@NotNull @NotNull List<TestCaseResult> getTestCaseResults(TestCase testCase, long buildNumber)
testCase
- to look forbuildNumber
- of the build the run should have occurred in@Nullable @Nullable BuildResultsSummary getSucceedingSinceBuildResultSummary(TestCase testCase)
testCase
- to search history for.@Deprecated int removeResultsByPlan(@NotNull @NotNull Plan plan)
TestClassResult
objects referenced by ResultsSummary
objects identified by planKeyplan
- planint removeResultsByPlan(PlanKey planKey)
TestClassResult
objects referenced by ResultsSummary
objects identified by planKeyplanKey
- planKey@NotNull @NotNull List<TestClassResult> getTestClassResults(@NotNull @NotNull PlanResultKey planResultKey)
planResultKey
- key of the BuildResultsSummary to get the tests class results forCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.