Class UploadTestsSubscriber
java.lang.Object
de.qytera.qtaf.testrail.event_subscriber.UploadTestsSubscriber
- All Implemented Interfaces:
IEventSubscriber
This subscriber binds to the test finished event and uploads the tests to the TestRail API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleantestRail API client.Returns the runId.rx.SubscriptionQTAF Event Subscription.voidhandleScenarioFailure(TestScenarioLogCollection scenarioLog, TestRail testRailIdAnnotation) Handle scenario failure.voidhandleScenarioSuccess(TestRail testRailIdAnnotation) Handle scenario success.inthashCode()voidvoidonFinishedTesting(String testingContext) Event handler for finished testing event.voidtestRail API client.voidsetTestFinishedSubscription(rx.Subscription testFinishedSubscription) QTAF Event Subscription.Set up the client for the TestRail API.toString()
-
Constructor Details
-
UploadTestsSubscriber
public UploadTestsSubscriber()
-
-
Method Details
-
initialize
public void initialize()- Specified by:
initializein interfaceIEventSubscriber
-
setUpClient
Set up the client for the TestRail API.- Returns:
- the client
- Throws:
GeneralSecurityException- if encrypted values cannot be decryptedMissingConfigurationValueException- if the configuration is invalid
-
onFinishedTesting
Event handler for finished testing event.- Parameters:
testingContext- Test context event payload
-
handleScenarioSuccess
Handle scenario success.- Parameters:
testRailIdAnnotation- testrail annotation of scenario
-
handleScenarioFailure
public void handleScenarioFailure(TestScenarioLogCollection scenarioLog, TestRail testRailIdAnnotation) Handle scenario failure.- Parameters:
scenarioLog- step logstestRailIdAnnotation- testrail annotation of scenario
-
getRunId
Returns the runId. The runId set in the configuration file is preferred to the runId set in the annotation.- Parameters:
testRailIdAnnotation- the annotation Object- Returns:
- the runId
-
getTestFinishedSubscription
public rx.Subscription getTestFinishedSubscription()QTAF Event Subscription. -
getClient
testRail API client. -
setTestFinishedSubscription
public void setTestFinishedSubscription(rx.Subscription testFinishedSubscription) QTAF Event Subscription. -
setClient
testRail API client. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-