Package ru.testit.services
Class AdapterManager
- java.lang.Object
-
- ru.testit.services.AdapterManager
-
public class AdapterManager extends java.lang.ObjectThis class manages data from a test framework.
-
-
Constructor Summary
Constructors Constructor Description AdapterManager(ClientConfiguration clientConfiguration, AdapterConfig adapterConfig)AdapterManager(ClientConfiguration clientConfiguration, AdapterConfig adapterConfig, ListenerManager listenerManager)AdapterManager(ClientConfiguration clientConfiguration, AdapterConfig adapterConfig, ThreadContext threadContext, ResultStorage storage, Writer writer, ApiClient client, ListenerManager listenerManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttachments(java.util.List<java.lang.String> attachments)java.util.Optional<java.lang.String>getCurrentTestCaseOrStep()java.util.List<java.lang.String>getTestFromTestRun()booleanisFilteredMode()voidscheduleTestCase(TestResult result)Schedule given test case.voidstartClassContainer(java.lang.String parentUuid, ClassContainer container)Starts class container.voidstartMainContainer(MainContainer container)Starts main container.voidstartPrepareFixture(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new prepare fixture with given parent.voidstartPrepareFixtureAll(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new prepare fixture with given parent.voidstartPrepareFixtureEachTest(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new prepare fixture with given parent.voidstartStep(java.lang.String parentUuid, java.lang.String uuid, StepResult result)Start a new step as child of specified parent.voidstartStep(java.lang.String uuid, StepResult result)Start a new step as child step of current running test case or step.voidstartTearDownFixture(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new tear down fixture with given parent.voidstartTearDownFixtureAll(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new tear down fixture with given parent.voidstartTearDownFixtureEachTest(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new tear down fixture with given parent.voidstartTestCase(java.lang.String uuid)Starts test case with given uuid.voidstartTests()voidstopClassContainer(java.lang.String uuid)Stops class container by given uuid.voidstopFixture(java.lang.String uuid)Stops fixture by given uuid.voidstopMainContainer(java.lang.String uuid)Stops main container by given uuid.voidstopStep()Stops current running step.voidstopStep(java.lang.String uuid)Stops step by given uuid.voidstopTestCase(java.lang.String uuid)Stops test case by given uuid.voidstopTests()voidupdateClassContainer(java.lang.String uuid, java.util.function.Consumer<ClassContainer> update)Updates class container.voidupdateFixture(java.lang.String uuid, java.util.function.Consumer<FixtureResult> update)Updates fixture by given uuid.voidupdateStep(java.lang.String uuid, java.util.function.Consumer<StepResult> update)Updates step by specified uuid.voidupdateStep(java.util.function.Consumer<StepResult> update)Updates current step.voidupdateTestCase(java.lang.String uuid, java.util.function.Consumer<TestResult> update)Updates test case by given uuid.voidupdateTestCase(java.util.function.Consumer<TestResult> update)Updates current test case
-
-
-
Constructor Detail
-
AdapterManager
public AdapterManager(ClientConfiguration clientConfiguration, AdapterConfig adapterConfig)
-
AdapterManager
public AdapterManager(ClientConfiguration clientConfiguration, AdapterConfig adapterConfig, ListenerManager listenerManager)
-
AdapterManager
public AdapterManager(ClientConfiguration clientConfiguration, AdapterConfig adapterConfig, ThreadContext threadContext, ResultStorage storage, Writer writer, ApiClient client, ListenerManager listenerManager)
-
-
Method Detail
-
startTests
public void startTests()
-
stopTests
public void stopTests()
-
startMainContainer
public void startMainContainer(MainContainer container)
Starts main container.- Parameters:
container- the main container.
-
stopMainContainer
public void stopMainContainer(java.lang.String uuid)
Stops main container by given uuid.- Parameters:
uuid- the uuid of container.
-
startClassContainer
public void startClassContainer(java.lang.String parentUuid, ClassContainer container)Starts class container.- Parameters:
parentUuid- the uuid of parent container.container- the class container.
-
stopClassContainer
public void stopClassContainer(java.lang.String uuid)
Stops class container by given uuid.- Parameters:
uuid- the uuid of container.
-
updateClassContainer
public void updateClassContainer(java.lang.String uuid, java.util.function.Consumer<ClassContainer> update)Updates class container.- Parameters:
uuid- the uuid of container.update- the update function.
-
startTestCase
public void startTestCase(java.lang.String uuid)
Starts test case with given uuid.- Parameters:
uuid- the uuid of test case to start.
-
scheduleTestCase
public void scheduleTestCase(TestResult result)
Schedule given test case.- Parameters:
result- the test case to schedule.
-
updateTestCase
public void updateTestCase(java.util.function.Consumer<TestResult> update)
Updates current test case- Parameters:
update- the update function.
-
updateTestCase
public void updateTestCase(java.lang.String uuid, java.util.function.Consumer<TestResult> update)Updates test case by given uuid.- Parameters:
uuid- the uuid of test case to update.update- the update function.
-
stopTestCase
public void stopTestCase(java.lang.String uuid)
Stops test case by given uuid.- Parameters:
uuid- the uuid of test case to stop.
-
startPrepareFixtureAll
public void startPrepareFixtureAll(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new prepare fixture with given parent.- Parameters:
parentUuid- the uuid of parent container.uuid- the fixture uuid.result- the fixture.
-
startTearDownFixtureAll
public void startTearDownFixtureAll(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new tear down fixture with given parent.- Parameters:
parentUuid- the uuid of parent container.uuid- the fixture uuid.result- the fixture.
-
startPrepareFixture
public void startPrepareFixture(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new prepare fixture with given parent.- Parameters:
parentUuid- the uuid of parent container.uuid- the fixture uuid.result- the fixture.
-
startTearDownFixture
public void startTearDownFixture(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new tear down fixture with given parent.- Parameters:
parentUuid- the uuid of parent container.uuid- the fixture uuid.result- the fixture.
-
startPrepareFixtureEachTest
public void startPrepareFixtureEachTest(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new prepare fixture with given parent.- Parameters:
parentUuid- the uuid of parent container.uuid- the fixture uuid.result- the fixture.
-
startTearDownFixtureEachTest
public void startTearDownFixtureEachTest(java.lang.String parentUuid, java.lang.String uuid, FixtureResult result)Start a new tear down fixture with given parent.- Parameters:
parentUuid- the uuid of parent container.uuid- the fixture uuid.result- the fixture.
-
updateFixture
public void updateFixture(java.lang.String uuid, java.util.function.Consumer<FixtureResult> update)Updates fixture by given uuid.- Parameters:
uuid- the uuid of fixture.update- the update function.
-
stopFixture
public void stopFixture(java.lang.String uuid)
Stops fixture by given uuid.- Parameters:
uuid- the uuid of fixture.
-
startStep
public void startStep(java.lang.String uuid, StepResult result)Start a new step as child step of current running test case or step.- Parameters:
uuid- the uuid of step.result- the step.
-
startStep
public void startStep(java.lang.String parentUuid, java.lang.String uuid, StepResult result)Start a new step as child of specified parent.- Parameters:
parentUuid- the uuid of parent test case or step.uuid- the uuid of step.result- the step.
-
updateStep
public void updateStep(java.util.function.Consumer<StepResult> update)
Updates current step.- Parameters:
update- the update function.
-
updateStep
public void updateStep(java.lang.String uuid, java.util.function.Consumer<StepResult> update)Updates step by specified uuid.- Parameters:
uuid- the uuid of step.update- the update function.
-
stopStep
public void stopStep()
Stops current running step.
-
stopStep
public void stopStep(java.lang.String uuid)
Stops step by given uuid.- Parameters:
uuid- the uuid of step to stop.
-
addAttachments
public void addAttachments(java.util.List<java.lang.String> attachments)
-
isFilteredMode
public boolean isFilteredMode()
-
getTestFromTestRun
public java.util.List<java.lang.String> getTestFromTestRun()
-
getCurrentTestCaseOrStep
public java.util.Optional<java.lang.String> getCurrentTestCaseOrStep()
-
-