Interface TestCaseDao
-
- All Superinterfaces:
BambooObjectDao<TestCase>
- All Known Implementing Classes:
TestCaseHibernateDao
public interface TestCaseDao extends BambooObjectDao<TestCase>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description int
countCurrentlyQuarantinedTests(ImmutableChain chain)
long
countTestCases()
Count all TestCase records@Nullable TestCase
findById(long testCaseId)
Find a specific testCase by id@NotNull List<TestCase>
getAllTestCasesWithExpiredQuarantine()
Deprecated.since 9.5@NotNull List<TestCase>
getLongestRunningTestCasesForPlan(@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<Long,Float>>
getLongestToFixTestCasesForBuildResults(@NotNull List<BuildResultsSummary> buildResults)
Retrieve a list of the test cases that have taken the longest amount of time to fix.@NotNull List<Pair<Long,Float>>
getLongestToFixTestCasesForPlan(@NotNull ImmutablePlan plan)
Retrieve a list of the test cases that have taken the longest amount of time to fix.@NotNull List<Pair<Long,Long>>
getMostFailingTestCasesForBuildResults(@NotNull List<BuildResultsSummary> buildResults)
Provide a list of the top 10 most failing test cases for a plan.@NotNull List<Pair<Long,Long>>
getMostFailingTestCasesForPlan(@NotNull ImmutablePlan plan)
Provide a list of the top 10 most failing test cases for a plan.@NotNull List<TestCase>
getQuarantinedTestCasesForChain(@NotNull ImmutableChain chain)
Provide a list of the quarantined tests for a job@NotNull List<TestCase>
getQuarantinedTestCasesForJob(@NotNull ImmutableJob job)
Provide a list of the quarantined tests for a job@NotNull List<Pair<Long,Long>>
getTopBrokenTests(@NotNull PlanKey planKey, BuildResultsFilter filter)
long
scrollTestCasesForExport(@NotNull Consumer<TestCase> consumer)
Scroll through and execute function for each of TestCase records Objects passed to function are not fully initialized.-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
-
-
-
Method Detail
-
findById
@Nullable @Nullable TestCase findById(long testCaseId)
Find a specific testCase by id- Parameters:
testCaseId
- of the test case you want to find- Returns:
- the testCase corresponding to the id provided.
-
getLongestRunningTestCasesForPlan
@NotNull @NotNull List<TestCase> getLongestRunningTestCasesForPlan(@NotNull @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)- Parameters:
plan
- to search in for the tests.- Returns:
- List of Pairs containing the testCase id (long) and the average duration (float)
-
getQuarantinedTestCasesForChain
@NotNull @NotNull List<TestCase> getQuarantinedTestCasesForChain(@NotNull @NotNull ImmutableChain chain)
Provide a list of the quarantined tests for a job- Parameters:
chain
- to search in for the tests.- Returns:
- List of TestCases
-
countCurrentlyQuarantinedTests
int countCurrentlyQuarantinedTests(ImmutableChain chain)
-
getQuarantinedTestCasesForJob
@NotNull @NotNull List<TestCase> getQuarantinedTestCasesForJob(@NotNull @NotNull ImmutableJob job)
Provide a list of the quarantined tests for a job- Parameters:
job
- to search in for the tests.- Returns:
- List of TestCases
-
getMostFailingTestCasesForPlan
@NotNull @NotNull List<Pair<Long,Long>> getMostFailingTestCasesForPlan(@NotNull @NotNull ImmutablePlan plan)
Provide a list of the top 10 most failing test cases for a plan. It is calculated based on failure count, not percentage. Results are ordered from most failing to least failing.- Parameters:
plan
- to search for the tests- Returns:
- List of Pairs containing the testCase id (long) and the number of failures found (int)
-
getMostFailingTestCasesForBuildResults
@NotNull @NotNull List<Pair<Long,Long>> getMostFailingTestCasesForBuildResults(@NotNull @NotNull List<BuildResultsSummary> buildResults)
Provide a list of the top 10 most failing test cases for a plan. It is calculated based on failure count, not percentage Results are ordered from most failing to least failing.- Parameters:
buildResults
- to search in for the tests.- Returns:
- List of Pairs containing the testCase id (long) and the number of failures found (int)
-
getLongestToFixTestCasesForPlan
@NotNull @NotNull List<Pair<Long,Float>> getLongestToFixTestCasesForPlan(@NotNull @NotNull ImmutablePlan plan)
Retrieve a list of the test cases that have taken the longest amount of time to fix. Returns top 10 with the longest to fix first.- Parameters:
plan
- to search for results in- Returns:
- List of Pairs containing the testCase id (long) and the average number of builds between breakages and its corresponding fix (float)
-
getLongestToFixTestCasesForBuildResults
@NotNull @NotNull List<Pair<Long,Float>> getLongestToFixTestCasesForBuildResults(@NotNull @NotNull List<BuildResultsSummary> buildResults)
Retrieve a list of the test cases that have taken the longest amount of time to fix. Returns top 10 with the longest to fix first.- Parameters:
buildResults
- to search in for the tests.- Returns:
- List of Pairs containing the testCase id (long) and the average number of builds between breakages and its corresponding fix (float)
-
getTopBrokenTests
@NotNull @NotNull List<Pair<Long,Long>> getTopBrokenTests(@NotNull @NotNull PlanKey planKey, BuildResultsFilter filter)
-
countTestCases
long countTestCases()
Count all TestCase records- Returns:
- number of TestCase records
-
scrollTestCasesForExport
long scrollTestCasesForExport(@NotNull @NotNull Consumer<TestCase> consumer)
Scroll through and execute function for each of TestCase records Objects passed to function are not fully initialized. Collections are empty and related objects have only id set.- Parameters:
consumer
- consumer to accept each of the TestCase records- Returns:
- number of traversed rows
-
getAllTestCasesWithExpiredQuarantine
@Deprecated @NotNull @NotNull List<TestCase> getAllTestCasesWithExpiredQuarantine()
Deprecated.since 9.5Returns a list of alltest cases
that are marked as quarantined, but their quarantine has expired.- Returns:
- test cases with expired quarantine
-
-