Package de.qytera.qtaf.xray.config
Class XrayStatusHelper
java.lang.Object
de.qytera.qtaf.xray.config.XrayStatusHelper
Utility class for converting QTAF statuses to Xray statuses.
-
Method Summary
Modifier and TypeMethodDescriptioncombinedScenarioStatus(Collection<TestScenarioLogCollection> scenarioLogs) Returns the combined status of multiple scenario logs.Returns the combined status of multiple step logs.static StringReturns the Xray status text of the test status, e.g.static StringReturns the Xray status text of the test step status, e.g.
-
Method Details
-
combinedScenarioStatus
public static TestScenarioLogCollection.Status combinedScenarioStatus(Collection<TestScenarioLogCollection> scenarioLogs) Returns the combined status of multiple scenario logs. The status is determined as follows:TestScenarioLogCollection.Status.FAILUREif any scenario has failedTestScenarioLogCollection.Status.PENDINGif a scenario is still pendingTestScenarioLogCollection.Status.SKIPPEDif any scenario was skippedTestScenarioLogCollection.Status.SUCCESSotherwise
- Parameters:
scenarioLogs- the scenario logs whose status should be determined- Returns:
- the combined status
- Throws:
IllegalArgumentException- if the collection is empty
-
combinedStepStatus
public static StepInformationLogMessage.Status combinedStepStatus(Collection<StepInformationLogMessage> stepLogs) Returns the combined status of multiple step logs. The status is determined as follows:StepInformationLogMessage.Status.ERRORif any step has failedStepInformationLogMessage.Status.PENDINGif a step is still pendingStepInformationLogMessage.Status.SKIPPEDif any step was skippedStepInformationLogMessage.Status.UNDEFINEDif any step status is undefinedStepInformationLogMessage.Status.PASSotherwise
- Parameters:
stepLogs- the step logs whose status should be determined- Returns:
- the combined status
- Throws:
IllegalArgumentException- if the collection is empty
-
statusToText
Returns the Xray status text of the test status, e.g."FAIL"or"SUCCESS". Depends on the Xray instance configuration.- Parameters:
status- the test status- Returns:
- the status text
-
statusToText
Returns the Xray status text of the test step status, e.g."PASSED"or"FAIL". Depends on the Xray instance configuration.- Parameters:
status- the test step status- Returns:
- the status text
-