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.static LogMessage.StatusReturns the combined status of multiple step logs.static StringReturns the Xray status text of the test status, e.g.static StringstatusToText(LogMessage.Status status) Returns 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
Returns the combined status of multiple step logs. The status is determined as follows:LogMessage.Status.FAILEDif any step has failedLogMessage.Status.PENDINGif a step is still pendingLogMessage.Status.SKIPPEDif any step was skippedLogMessage.Status.PASSEDotherwise
- 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
-