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 STestcreateTest(long testNameId, String projectId)Deprecated.STestcreateTest(TestName testName, long testNameId, String projectId)Creates an instance of STest with given test name, testNameId and project id.STestcreateTest(TestName testName, String projectId)Creates an instance of STest with given test name and project id.STestRuncreateTestRun(int orderId, int testRunId, int duration, STest test, Status status)TestRunExcreateTestRun(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.STestfindTest(long testNameId, String projectId)Looks for a test with given identifier, return null if a test name with this ID does not existTestRunMetadatagetMetadata(STestRun testRun)voidsetTestRunContext(TestRunContext testRunContext)voidsetTestServices(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:STestManagerCreates an instance of STest with given test name, testNameId and project id.- Specified by:
createTestin 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:STestManagerCreates an instance of STest with given test name and project id. Consider usingSTestManager.createTest(TestName, long, String)whenever possible- Specified by:
createTestin 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:STestManagerLooks for a test with given identifier, return null if a test name with this ID does not exist- Specified by:
findTestin 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:
getMetadatain interfaceTestMetadataProvider
-
createTest
@Deprecated @NotNull public STest createTest(long testNameId, @NotNull String projectId)
Deprecated.Description copied from interface:STestManagerGiven test id and project id, creates and returns theSTestinstance. If there is no test name corresponding to specified test id, an empty string is used.- Specified by:
createTestin 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:STestManagerCreates tests for a set of test name ids in a given project.- Specified by:
createTestsin 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:
createTestRunin 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
testRunIdof 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. IfbuildManageris non-null, the test run instance is lightweight.- Specified by:
createTestRunin 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)
-
-