Interface TestHistory
-
- All Known Implementing Classes:
TestHistoryImpl
public interface TestHistory
- Since:
- 2020.2
- Author:
- kir
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Long2StatusCollection
getBuild2StatusMapForTest(long testNameId, Set<String> buildTypeIds, long minBuildId)
Loads test statuses across all builds in the given build configurations.Collection<SBuildType>
getBuildTypesForTests(Collection<Long> testNameIds, SProject project)
Returns the collection of build types, in which the tests that correspond totestNameIds
were executed (the union, not intersection).Collection<SBuildType>
getBuildTypesForTests(Collection<STest> tests)
Returns the collection of build types, in which thetests
were executed (the union, not intersection).Collection<SBuildType>
getBuildTypesForTests(SProject project, Collection<TestName> testNames)
Returns the collection of build types, in which the tests that correspond totestNames
were executed (the union, not intersection).Collection<SBuildType>
getBuildTypesWithTest(SProject project, long testNameId)
BuildTypeTests
getBuildTypeTests(String buildTypeId)
Collection<SBuild>
getLastBuildsForTestsActiveBranches(Collection<Long> testNameIds, SProject project)
Same as TestsHistory#getLastBuildsForTestsDefaultBranch for all active branches.Collection<SBuild>
getLastBuildsForTestsDefaultBranch(Collection<Long> testNameIds, SProject project)
Returns the last finished builds in the project that have any of the tests specified either passed or failed (ignored tests are not considered).Collection<SBuildType>
getRelevantBuildTypes(SBuild build)
Return build types which should be treated equally when calculating "isNew" and "isFixedIn" status for a test.List<STestRun>
getTestHistory(long testNameId, String buildTypeId, long userId, String branchName)
Order of the returned TestRuns is recent runs first, according to the starting order of the builds.List<STestRun>
getTestHistory(long testNameId, String buildTypeId, Filter<STestRun> filter)
Order of the returned TestRuns is recent runs first, according to the starting order of the builds.List<STestRun>
getTestHistory(long testNameId, SProject project, long userId, String branchName)
Order of the returned TestRuns is recent runs first, according to the starting order of the builds.List<STestRun>
getTestHistory(long testNameId, SProject project, Filter<STestRun> filter)
Order of the returned TestRuns is recent runs first, according to the starting order of the builds.Long2StatusCollection
getTestStatuses(Collection<Long> testNameIds, long buildId, boolean cacheResults)
Return a Long2StatusCollection which contains statuses of test runs for build from testNameIds collectionboolean
hasBuildsWithTests(BuildType buildType)
Returns the number of builds of the given Build Type that have at leat one test run.
-
-
-
Method Detail
-
hasBuildsWithTests
boolean hasBuildsWithTests(@NotNull BuildType buildType)
Returns the number of builds of the given Build Type that have at leat one test run.- Parameters:
buildType
- Build Type- Returns:
- true if build configuration has builds with tests.
-
getLastBuildsForTestsDefaultBranch
@NotNull Collection<SBuild> getLastBuildsForTestsDefaultBranch(@NotNull Collection<Long> testNameIds, @Nullable SProject project)
Returns the last finished builds in the project that have any of the tests specified either passed or failed (ignored tests are not considered).- Parameters:
testNameIds
- the ids of the testsproject
- the project to search in, `null` project means all active build types under `root` project on buildserver- Returns:
- required builds
-
getLastBuildsForTestsActiveBranches
@NotNull Collection<SBuild> getLastBuildsForTestsActiveBranches(@NotNull Collection<Long> testNameIds, @Nullable SProject project)
Same as TestsHistory#getLastBuildsForTestsDefaultBranch for all active branches. One build for every pair of build configuration and branch name.
-
getBuildTypesForTests
@NotNull Collection<SBuildType> getBuildTypesForTests(@NotNull Collection<Long> testNameIds, @Nullable SProject project)
Returns the collection of build types, in which the tests that correspond totestNameIds
were executed (the union, not intersection). If theproject
is specified, the result is filtered by it.Currently running builds are not considered.
- Parameters:
testNameIds
- the tests collectionproject
- the project (nullable)- Returns:
- collection of build types
- Since:
- 7.1
-
getBuildTypesForTests
@NotNull Collection<SBuildType> getBuildTypesForTests(@NotNull Collection<STest> tests)
Returns the collection of build types, in which thetests
were executed (the union, not intersection). If all tests are from one project, the result is filtered by it.Currently running builds are not considered.
- Parameters:
tests
- the tests collection- Returns:
- collection of build types
- Since:
- 7.1
-
getBuildTypesForTests
@NotNull Collection<SBuildType> getBuildTypesForTests(@Nullable SProject project, @NotNull Collection<TestName> testNames)
Returns the collection of build types, in which the tests that correspond totestNames
were executed (the union, not intersection). If theproject
is specified, the result is filtered by it.Currently running builds are not considered.
- Parameters:
project
- the project (nullable)testNames
- the tests collection- Returns:
- collection of build types
- Since:
- 7.1
-
getTestStatuses
Long2StatusCollection getTestStatuses(@NotNull Collection<Long> testNameIds, long buildId, boolean cacheResults)
Return a Long2StatusCollection which contains statuses of test runs for build from testNameIds collection- Parameters:
buildId
- build to analyzetestNameIds
- collection of testscacheResults
- should be false if build is running- Returns:
- see above
-
getTestHistory
@NotNull List<STestRun> getTestHistory(long testNameId, @NotNull String buildTypeId, long userId, @Nullable String branchName)
Order of the returned TestRuns is recent runs first, according to the starting order of the builds. Multiple test runs in the build are NOT wrapped into MultiRun class, i.e. each test run is returned independently- Parameters:
testNameId
-buildTypeId
- required to set the build configuration for the test historyuserId
- if > 0, includes personal builds of the given userbranchName
- if not null, returns only builds which match given branchName- Returns:
- Test run objects for given test, recent builds go first
-
getTestHistory
@NotNull List<STestRun> getTestHistory(long testNameId, @NotNull SProject project, long userId, @Nullable String branchName)
Order of the returned TestRuns is recent runs first, according to the starting order of the builds. Multiple test runs in the build are NOT wrapped into MultiRun class, i.e. each test run is returned independently- Parameters:
testNameId
-project
- required to set the parent project, all returned test runs will belong to build configurations under this project and its subprojectsuserId
- if > 0, includes personal builds of the given userbranchName
- if not null, returns only builds which match given branchName- Returns:
- Test run objects for given test, recent builds go first
-
getTestHistory
@NotNull List<STestRun> getTestHistory(long testNameId, @NotNull String buildTypeId, Filter<STestRun> filter)
Order of the returned TestRuns is recent runs first, according to the starting order of the builds. Multiple test runs in the build are NOT wrapped into MultiRun class, i.e. each test run is returned independently- Parameters:
testNameId
-buildTypeId
- required to set the build configuration for the test historyfilter
- additional filter for the returned test runs- Returns:
- Test run objects for given test, recent builds go first
-
getTestHistory
@NotNull List<STestRun> getTestHistory(long testNameId, @NotNull SProject project, Filter<STestRun> filter)
Order of the returned TestRuns is recent runs first, according to the starting order of the builds. Multiple test runs in the build are NOT wrapped into MultiRun class, i.e. each test run is returned independently- Parameters:
testNameId
-project
- required to set the parent project, all returned test runs will belong to build configurations under this project and its subprojectsfilter
- additional filter for the returned test runs- Returns:
- Test run objects for given test, recent builds go first
-
getBuildTypesWithTest
@NotNull Collection<SBuildType> getBuildTypesWithTest(@NotNull SProject project, long testNameId)
-
getBuildTypeTests
BuildTypeTests getBuildTypeTests(@NotNull String buildTypeId)
-
getBuild2StatusMapForTest
Long2StatusCollection getBuild2StatusMapForTest(long testNameId, @NotNull Set<String> buildTypeIds, long minBuildId)
Loads test statuses across all builds in the given build configurations.Return a map structure: buildId -> Status for test statuses of a test with given testNameId, in no particular order
- Parameters:
testNameId
-buildTypeIds
-minBuildId
- Minimal value of buildId for which the data will be obtained (inclusive)- Returns:
- see above
-
getRelevantBuildTypes
@NotNull Collection<SBuildType> getRelevantBuildTypes(@NotNull SBuild build)
Return build types which should be treated equally when calculating "isNew" and "isFixedIn" status for a test.- Parameters:
build
- build for which the scope should be calculated. This build may belong to any of the configurations from the scope, or maybe some parent configuration.- Returns:
- see above
- Since:
- 2022.10
- See Also:
BuildTypesTestScope
-
-