Class TestManagerImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.TestManagerImpl
-
- All Implemented Interfaces:
TestMetadataProvider
,STestManager
public class TestManagerImpl extends Object implements STestManager
- Author:
- Sergey Anchipolevsky, Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Constructor Summary
Constructors Constructor Description TestManagerImpl(TestName2Index testName2Index)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description STest
createTest(long testNameId, String projectId)
Deprecated.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 existTestRunMetadata
getMetadata(STestRun testRun)
void
setTestRunContext(TestRunContext testRunContext)
void
setTestServices(TestContext testServices)
-
-
-
Constructor Detail
-
TestManagerImpl
public TestManagerImpl(@NotNull TestName2Index testName2Index)
-
-
Method Detail
-
setTestServices
public void setTestServices(TestContext testServices)
-
setTestRunContext
public void setTestRunContext(TestRunContext testRunContext)
-
createTest
@NotNull public STest createTest(@NotNull TestName testName, long testNameId, @NotNull String projectId)
Description copied from interface:STestManager
Creates an instance of STest with given test name, testNameId and project id.- Specified by:
createTest
in interfaceSTestManager
- Parameters:
testName
- test name.testNameId
- test name ID, must be consistent with testNameprojectId
- project identifier.- Returns:
- corresponding test.
-
createTest
@NotNull public STest createTest(@NotNull TestName testName, @NotNull String projectId)
Description copied from interface:STestManager
Creates an instance of STest with given test name and project id. Consider usingSTestManager.createTest(TestName, long, String)
whenever possible- Specified by:
createTest
in interfaceSTestManager
- Parameters:
testName
- test name.projectId
- project identifier.- Returns:
- corresponding test.
- See Also:
STestManager.findTest(long, String)
,STestManager.createTest(TestName, long, String)
-
findTest
@Nullable public STest findTest(long testNameId, @NotNull String projectId)
Description copied from interface:STestManager
Looks for a test with given identifier, return null if a test name with this ID does not exist- Specified by:
findTest
in interfaceSTestManager
- Parameters:
testNameId
- identifier of test name.projectId
- project identifier.- Returns:
- corresponding test; or null if not found.
- See Also:
STestManager.createTest(jetbrains.buildServer.tests.TestName, String)
-
getMetadata
@NotNull public TestRunMetadata getMetadata(@NotNull STestRun testRun)
- Specified by:
getMetadata
in interfaceTestMetadataProvider
-
createTest
@Deprecated @NotNull public STest createTest(long testNameId, @NotNull String projectId)
Deprecated.Description copied from interface:STestManager
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.- Specified by:
createTest
in interfaceSTestManager
- Parameters:
testNameId
- test name idprojectId
- project id- Returns:
- corresponding test instance
- See Also:
STestManager.createTest(TestName, long, String)
-
createTests
@NotNull public Map<Long,STest> createTests(@NotNull Set<Long> testNameIds, @NotNull String projectId)
Description copied from interface:STestManager
Creates tests for a set of test name ids in a given project.- Specified by:
createTests
in interfaceSTestManager
- Parameters:
testNameIds
- set of test name idsprojectId
- project id- Returns:
- map of test name id to STest object
-
createTestRun
public STestRun createTestRun(int orderId, int testRunId, int duration, @NotNull STest test, @NotNull Status status)
- Specified by:
createTestRun
in interfaceSTestManager
-
createTestRun
@NotNull public 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.- Specified by:
createTestRun
in interfaceSTestManager
- 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.
- See Also:
STestManager.createTestRun(SBuild, STest, Status, BuildsManager)
-
-