Package jetbrains.buildServer.serverSide
Interface STestManager
-
- All Superinterfaces:
TestMetadataProvider
- All Known Implementing Classes:
TestManagerImpl
public interface STestManager extends TestMetadataProvider
The data-access object for tests (right now acts merely as a factory).Can become a part of open API some day, though right now there is no critical need for it.
Note on performance: all
create
methods are simple factory methods that just instantiate new objects, with few additions:- the method may need to look up the test name by id. This data is cached most of the time, but may perform extra DB operation occasionally. In other words one particular method call can be slow.
- if the method needs to populate external test information (e.g. test mute info), the retrieval may perform extra DB operation. In this case each method call would be slow, thus method is not designed to be called in a loop.
- Since:
- 6.5
- Author:
- Sergey Anchipolevsky, Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description STest
createTest(long testNameId, String projectId)
Deprecated.usefindTest(long, String)
instead.STest
createTest(TestName testName, long testNameId, String projectId)
Creates an instance of STest with given test name, testNameId and project id.STest
createTest(TestName testName, String projectId)
Creates an instance of STest with given test name and project id.STestRun
createTestRun(int orderId, int testRunId, int duration, STest test, Status status)
TestRunEx
createTestRun(SBuild build, STest test, Status testStatus, BuildsManager buildManager)
Creates a new test run instance.Map<Long,STest>
createTests(Set<Long> testNameIds, String projectId)
Creates tests for a set of test name ids in a given project.STest
findTest(long testNameId, String projectId)
Looks for a test with given identifier, return null if a test name with this ID does not exist-
Methods inherited from interface jetbrains.buildServer.serverSide.stat.TestMetadataProvider
getMetadata
-
-
-
-
Method Detail
-
createTest
@NotNull STest createTest(@NotNull TestName testName, long testNameId, @NotNull String projectId)
Creates an instance of STest with given test name, testNameId and project id.- Parameters:
testName
- test name.testNameId
- test name ID, must be consistent with testNameprojectId
- project identifier.- Returns:
- corresponding test.
- Since:
- 2019.1
-
createTest
@NotNull STest createTest(@NotNull TestName testName, @NotNull String projectId)
Creates an instance of STest with given test name and project id. Consider usingcreateTest(TestName, long, String)
whenever possible- Parameters:
testName
- test name.projectId
- project identifier.- Returns:
- corresponding test.
- Since:
- 6.5
- See Also:
findTest(long, String)
,createTest(TestName, long, String)
-
findTest
@Nullable STest findTest(long testNameId, @NotNull String projectId)
Looks for a test with given identifier, return null if a test name with this ID does not exist- Parameters:
testNameId
- identifier of test name.projectId
- project identifier.- Returns:
- corresponding test; or null if not found.
- Since:
- 6.5
- See Also:
createTest(jetbrains.buildServer.tests.TestName, String)
-
createTest
@NotNull @Deprecated STest createTest(long testNameId, @NotNull String projectId)
Deprecated.usefindTest(long, String)
instead.Given test id and project id, creates and returns theSTest
instance. If there is no test name corresponding to specified test id, an empty string is used.- Parameters:
testNameId
- test name idprojectId
- project id- Returns:
- corresponding test instance
- See Also:
createTest(TestName, long, String)
-
createTests
@NotNull Map<Long,STest> createTests(@NotNull Set<Long> testNameIds, @NotNull String projectId)
Creates tests for a set of test name ids in a given project.- Parameters:
testNameIds
- set of test name idsprojectId
- project id- Returns:
- map of test name id to STest object
-
createTestRun
STestRun createTestRun(int orderId, int testRunId, int duration, @NotNull STest test, @NotNull Status status)
-
createTestRun
@NotNull TestRunEx createTestRun(@Nullable SBuild build, @NotNull STest test, @NotNull Status testStatus, @Nullable BuildsManager buildManager)
Creates a new test run instance. The instance created will have
testRunId
of 0, meaning HTML hyperlinks (to the build progress log) constructed from this instance (e. g., using<tt:testNameWithPopup/>
), when followed, will result in the 1st line of the build progress log focused. IfbuildManager
is non-null
, the test run instance is lightweight.- Parameters:
build
- the build this test run will belong to.test
- the test which ran as a part ofbuild
.testStatus
- the status of the test run.buildManager
- build manager used to look up builds; if non-null
, the returned instance is lightweight.- Returns:
- the newly created test run instance.
- Since:
- 10.0
- See Also:
createTestRun(int, int, int, STest, Status)
-
-