public class TestCaseHibernateDao extends BambooHibernateObjectDao<TestCase> implements TestCaseDao
Constructor and Description |
---|
TestCaseHibernateDao() |
Modifier and Type | Method and Description |
---|---|
int |
countCurrentlyQuarantinedTests(ImmutableChain chain) |
long |
countTestCases()
Count all TestCase records
|
TestCase |
findById(long testCaseId)
Find a specific testCase by id
|
List<TestCase> |
getAllTestCasesWithExpiredQuarantine()
Returns a list of all
test cases that are marked as quarantined, but their quarantine has
expired. |
List<TestCase> |
getLongestRunningTestCasesForPlan(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)
|
List<Pair<Long,Float>> |
getLongestToFixTestCasesForBuildResults(List<BuildResultsSummary> buildResults)
Retrieve a list of the test cases that have taken the longest amount of time to fix.
|
List<Pair<Long,Float>> |
getLongestToFixTestCasesForPlan(ImmutablePlan plan)
Retrieve a list of the test cases that have taken the longest amount of time to fix.
|
List<Pair<Long,Long>> |
getMostFailingTestCasesForBuildResults(List<BuildResultsSummary> buildResults)
Provide a list of the top 10 most failing test cases for a plan.
|
List<Pair<Long,Long>> |
getMostFailingTestCasesForPlan(ImmutablePlan plan)
Provide a list of the top 10 most failing test cases for a plan.
|
List<TestCase> |
getQuarantinedTestCasesForChain(ImmutableChain chain)
Provide a list of the quarantined tests for a job
|
List<TestCase> |
getQuarantinedTestCasesForJob(ImmutableJob job)
Provide a list of the quarantined tests for a job
|
List<Pair<Long,Long>> |
getTopBrokenTests(PlanKey planKey,
BuildResultsFilter filter) |
long |
scrollTestCasesForExport(Consumer<TestCase> consumer)
Scroll through and execute function for each of TestCase records
Objects passed to function are not fully initialized.
|
countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAll
getCacheAwareHibernateTemplate
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
public TestCase findById(long testCaseId)
TestCaseDao
findById
in interface TestCaseDao
testCaseId
- of the test case you want to find@NotNull public List<TestCase> getLongestRunningTestCasesForPlan(@NotNull ImmutablePlan plan)
TestCaseDao
getLongestRunningTestCasesForPlan
in interface TestCaseDao
plan
- to search in for the tests.@NotNull public List<TestCase> getQuarantinedTestCasesForChain(@NotNull ImmutableChain chain)
TestCaseDao
getQuarantinedTestCasesForChain
in interface TestCaseDao
chain
- to search in for the tests.public int countCurrentlyQuarantinedTests(ImmutableChain chain)
countCurrentlyQuarantinedTests
in interface TestCaseDao
@NotNull public List<TestCase> getQuarantinedTestCasesForJob(@NotNull ImmutableJob job)
TestCaseDao
getQuarantinedTestCasesForJob
in interface TestCaseDao
job
- to search in for the tests.@NotNull public List<Pair<Long,Long>> getMostFailingTestCasesForPlan(@NotNull ImmutablePlan plan)
TestCaseDao
getMostFailingTestCasesForPlan
in interface TestCaseDao
plan
- to search for the tests@NotNull public List<Pair<Long,Long>> getMostFailingTestCasesForBuildResults(@NotNull List<BuildResultsSummary> buildResults)
TestCaseDao
getMostFailingTestCasesForBuildResults
in interface TestCaseDao
buildResults
- to search in for the tests.@NotNull public List<Pair<Long,Float>> getLongestToFixTestCasesForPlan(@NotNull ImmutablePlan plan)
TestCaseDao
getLongestToFixTestCasesForPlan
in interface TestCaseDao
plan
- to search for results in@NotNull public List<Pair<Long,Float>> getLongestToFixTestCasesForBuildResults(@NotNull List<BuildResultsSummary> buildResults)
TestCaseDao
getLongestToFixTestCasesForBuildResults
in interface TestCaseDao
buildResults
- to search in for the tests.@NotNull public List<Pair<Long,Long>> getTopBrokenTests(@NotNull PlanKey planKey, BuildResultsFilter filter)
getTopBrokenTests
in interface TestCaseDao
public long countTestCases()
TestCaseDao
countTestCases
in interface TestCaseDao
public long scrollTestCasesForExport(@NotNull Consumer<TestCase> consumer)
TestCaseDao
scrollTestCasesForExport
in interface TestCaseDao
consumer
- consumer to accept each of the TestCase records@NotNull public List<TestCase> getAllTestCasesWithExpiredQuarantine()
TestCaseDao
test cases
that are marked as quarantined, but their quarantine has
expired.getAllTestCasesWithExpiredQuarantine
in interface TestCaseDao
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.