Interface InvestigationTestRunsHolder
-
- All Known Implementing Classes:
InvestigationTestRunsHolderImpl
public interface InvestigationTestRunsHolder
Allows to get the test runs for a test, or test status across all build configurations in a project.More specifically, the component maintains last test run for each build configuration, in which the test has run.
Currently for muted and being investigated tests only (for performance reasons).
- Since:
- 7.0
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<SBuildType,List<STestRun>>
getFailingTestRunsFromRunningBuilds(Collection<SRunningBuild> runningBuilds)
Returns the list of last failing test runs from all running builds from all branches.Map<String,HashMap<String,STestRun>>
getLastFailedTestRuns(long testId, SProject project)
Returns last failed test runs for a specified test in specified collection.List<STestRun>
getLastTestRunsInBulk(Set<Long> testNameIds, String projectId, boolean onlyForDefaultBranch)
Returns all test runs for all specified tests and in the specified project.Map<Long,STestRun>
getWorstInvestigatedOrMutedTestRuns(SBuild build)
Returns map of worst test runs for each testNameId from build (for tests under investigation or mute).boolean
isFixedInDefaultBranch(String buildTypeId, long testNameId)
Return true if there was a recent build in the default branch of the given build configuration, where test with given testNameId got fixed.boolean
isReady()
-
-
-
Method Detail
-
isReady
boolean isReady()
- Returns:
- true if the cache was already initialized
- Since:
- 2017.2
-
getLastFailedTestRuns
@NotNull Map<String,HashMap<String,STestRun>> getLastFailedTestRuns(long testId, @NotNull SProject project)
Returns last failed test runs for a specified test in specified collection. I.e. the result list consists of last run in complete builds in default branch for each build type in a project and failed test runs in branchesCurrently the result of the method includes successful builds and exclude running build.
- Parameters:
testId
- the test idproject
- the top-most parent project for the returned test runs (project or some of its subprojects (not only direct))- Returns:
- the map (buildTYpeId -> map (branchName -> STestRun)), branchName == null is for default branches
-
getLastTestRunsInBulk
@NotNull List<STestRun> getLastTestRunsInBulk(@NotNull Set<Long> testNameIds, @NotNull String projectId, boolean onlyForDefaultBranch)
Returns all test runs for all specified tests and in the specified project.- Parameters:
testNameIds
- test name idsprojectId
- project id - parent project for returned TestRuns (project or some of its subprojects (not only direct))onlyForDefaultBranch
- whether we should collect test runs for default branch only or for all the branches. the flag is ignored when processing for branches is disabled.- Returns:
- the list of all recent test runs;
-
getFailingTestRunsFromRunningBuilds
@NotNull Map<SBuildType,List<STestRun>> getFailingTestRunsFromRunningBuilds(@NotNull Collection<SRunningBuild> runningBuilds)
Returns the list of last failing test runs from all running builds from all branches. Only tests currently muted or investigated are considered.- Returns:
- list of last failing test runs, history information is not pre-loaded there
-
getWorstInvestigatedOrMutedTestRuns
Map<Long,STestRun> getWorstInvestigatedOrMutedTestRuns(@NotNull SBuild build)
Returns map of worst test runs for each testNameId from build (for tests under investigation or mute). For instance if there are successful test run and failed test run for same testNameId, the method will return failed one only.- Returns:
- map testNameId to worst in the build STestRun
-
isFixedInDefaultBranch
boolean isFixedInDefaultBranch(@NotNull String buildTypeId, long testNameId)
Return true if there was a recent build in the default branch of the given build configuration, where test with given testNameId got fixed. If the test fails again after the fix, the method returns false- Returns:
- see above
-
-